Code: Select all
Error: Parse error on line 4:
...ar", "frames": [ ("bmp": "RallyCar.pn
---------------------^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', ']', got 'undefined'
Moderator: Plugin Moderators
Code: Select all
Error: Parse error on line 4:
...ar", "frames": [ ("bmp": "RallyCar.pn
---------------------^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', ']', got 'undefined'
Code: Select all
Error: Parse error on line 11:
... }], "v2": true}][{ "id": "$garage.r
--------------------^
Expecting 'EOF', '}', ',', ']', got '['
Code: Select all
Error: Parse error on line 11:
... }], "v2": true}], [{ "id": "$garage
--------------------^
Expecting 'EOF', got ','
A JSON file can either contain a top level object {} or a top level array []. For plugins we use a top level array, therefore our base structure looks like
Code: Select all
[
...
]
Code: Select all
[
...
],
[
...
]
Code: Select all
[{
"id": "Rallycar00",
"type": "car",
"frames": [{
"bmp": "RallyCar.png",
"w": 28,
"h": 10,
"count": 4
}],
"v2": true
}, {
"id": "$garage.rally.unique.id.dc00",
"type": "sport",
"author": "Barky",
"text": "A small compund for your rally-kart, must be built next to track",
"width": 1,
"height": 1,
"frames": [{
"bmp": "RallyStation.png"
}],
"needs road": false,
"price": 1000,
"monthly price": 10,
"car": "Rallycar00",
"car radius": "512",
"car count": "1"
},
{
"id": "RallyTrack001",
"type": "road",
"flag user5": true,
"flag normal": false,
"author": "Barky",
"text": "A track for your rallies!",
"level": 1,
"width": 1,
"height": 1,
"frames": [{
"bmp": "RallyTrack.png",
"w": 32,
"h": 16,
"count": 16
}],
"speed": 5.0,
"price": 50,
"monthly price": 5,
"allow transfer": false,
"connectable": false,
"allow bus": false
}
]
Code: Select all
"flag user5": true,
"flag normal": false,
Code: Select all
"car local only":true