Page 1 of 1

[514] Plugin crash (Purpleroad.json:957)

Posted: 16 Sep 2018, 10:29
by MsmNoMoreSpam
Hi, I got the following error with a plugin (Purpleroad.json:957):

Code: Select all

In /storage/emulated/0/TheoTown/plugins/purpleroad/Purpleroad.json:

org.json.JSONException: Unterminated object at character 690 of 
[
  {
    "id":"$purpleroad00",
    "type":"road",
    "level":10,
    "speed":50.0,
    "title":"Purple road",
    "text":"enjoy:-D",

    "frames":[{"bmp":"road.png","w":32,"h":16,"count":16}],

    "bridge frames":[{"bmp":"bridge.png","w":32,"h":48,"count":12}],
    "bridge height":12,

    "tunnel frames":[
                 {"bmp":"tunnel_frames.png","x":0,"w":16,"h":19,"handle y":7},
                 {"bmp":"tunnel_frames.png","x":16,"w":16,"h":19,"handle x":-16,"handle y":7},
                 {"bmp":"tunnel_frames.png","x":32,"w":16,"h":19,"handle y":7},
                 {"bmp":"tunnel_frames.png","x":48,"w":16,"h":19,"handle x":-16,"handle y":7}
                    ]

    "traffic lights":[{"bmp":"tf.png","w":32,"h":32,"count":4}],
    "green phase":3000,
    "yellow phase":500,

    "price":500,
    "bridge price":2000,
    "monthly price":20,
    "allow bus":true
  }
]
Thank you in advance.

Re: [514] Plugin crash (Purpleroad.json:957)

Posted: 16 Sep 2018, 10:32
by MsmNoMoreSpam

Re: [514] Plugin crash (Purpleroad.json:957)

Posted: 16 Sep 2018, 11:14
by JustAnyone
jsonlint.com

Re: [514] Plugin crash (Purpleroad.json:957)

Posted: 16 Sep 2018, 11:17
by MsmNoMoreSpam
JustAnyone wrote:
16 Sep 2018, 11:14
jsonlint.com
Screenshot?

Re: [514] Plugin crash (Purpleroad.json:957)

Posted: 16 Sep 2018, 11:28
by MsmNoMoreSpam
MsmNoMoreSpam wrote:
16 Sep 2018, 10:29
Hi, I got the following error with a plugin (Purpleroad.json:957):

Code: Select all

In /storage/emulated/0/TheoTown/plugins/purpleroad/Purpleroad.json:

org.json.JSONException: Unterminated object at character 690 of 
[
  {
    "id":"$purpleroad00",
    "type":"road",
    "level":10,
    "speed":50.0,
    "title":"Purple road",
    "text":"enjoy:-D",

    "frames":[{"bmp":"road.png","w":32,"h":16,"count":16}],

    "bridge frames":[{"bmp":"bridge.png","w":32,"h":48,"count":12}],
    "bridge height":12,

    "tunnel frames":[
                 {"bmp":"tunnel_frames.png","x":0,"w":16,"h":19,"handle y":7},
                 {"bmp":"tunnel_frames.png","x":16,"w":16,"h":19,"handle x":-16,"handle y":7},
                 {"bmp":"tunnel_frames.png","x":32,"w":16,"h":19,"handle y":7},
                 {"bmp":"tunnel_frames.png","x":48,"w":16,"h":19,"handle x":-16,"handle y":7}
                    ]

    "traffic lights":[{"bmp":"tf.png","w":32,"h":32,"count":4}],
    "green phase":3000,
    "yellow phase":500,

    "price":500,
    "bridge price":2000,
    "monthly price":20,
    "allow bus":true
  }
]
Thank you in advance.
@CommanderABab[Posts][PM]

Re: [514] Plugin crash (Purpleroad.json:957)

Posted: 16 Sep 2018, 16:26
by FranchuFranchu
You were missing a comma. Correct version:

Code: Select all

[{
	"id": "$purpleroad00",
	"type": "road",
	"level": 10,
	"speed": 50.0,
	"title": "Purple road",
	"text": "enjoy:-D",

	"frames": [{
		"bmp": "road.png",
		"w": 32,
		"h": 16,
		"count": 16
	}],

	"bridge frames": [{
		"bmp": "bridge.png",
		"w": 32,
		"h": 48,
		"count": 12
	}],
	"bridge height": 12,

	"tunnel frames": [{
			"bmp": "tunnel_frames.png",
			"x": 0,
			"w": 16,
			"h": 19,
			"handle y": 7
		},
		{
			"bmp": "tunnel_frames.png",
			"x": 16,
			"w": 16,
			"h": 19,
			"handle x": -16,
			"handle y": 7
		},
		{
			"bmp": "tunnel_frames.png",
			"x": 32,
			"w": 16,
			"h": 19,
			"handle y": 7
		},
		{
			"bmp": "tunnel_frames.png",
			"x": 48,
			"w": 16,
			"h": 19,
			"handle x": -16,
			"handle y": 7
		}
	],

	"traffic lights": [{
		"bmp": "tf.png",
		"w": 32,
		"h": 32,
		"count": 4
	}],
	"green phase": 3000,
	"yellow phase": 500,

	"price": 500,
	"bridge price": 2000,
	"monthly price": 20,
	"allow bus": true
}]