Page 1 of 1

[Answered][1.8.41a] Plugin crash (definition.json:692)

Posted: 24 May 2020, 09:36
by Sergio2203
Hi, I got the following error with a plugin (definition.json:692):

Code: Select all

In /storage/emulated/0/TheoTown/plugins/japan07/definition.json:

io.blueflower.stapel2d.util.json.JSONException: Expected ':' after Japan7billb at line 3, char 24. Excerpt: 
	{
		"id": [{"Japan7billb"--ERROR->>>,},{"Japan7billb2"}],

Full source: [
	{
		"id": [{"Japan7billb",},{"Japan7billb2"}],
		"type": "animation",
		"frames": [{"bmp": "Japan7billboard.png", "w": 134, "h": 95, "count": 8},{"bmp": "Japanbillboard2.png","w":134,"h":51, "count": 16}],
		"handle interpolation": 6,
		"light": true
	},
  {
   "id":"Japan7Night",
   "frames":[{"bmp":"japan7N1.png"}],
   "type":"animation",
   "light":true, "light switching":true
 },
 {
   "id":"akicom7",
   "type":"commercial",
   "width":6,
   "height":6,
   "animation":[{"id":"Japan7Night", "x":0, "y":-219},{"id": "Japan7billb", "x": 64, "y": -77},{"id": "Japan7billb2", "x":14, "y":-167}],
   "frames":[{"bmp":"japan7.png"}],
   "people":150,
   "level":1,
   "author":"xxx"
 }
]
Device: moto g(6) play (motorola)
OS version: 26

Thank you in advance.

Re: [Asked][1.8.41a] Plugin crash (definition.json:692)

Posted: 24 May 2020, 09:56
by Bearbear76
Sergio2203 wrote:
24 May 2020, 09:36
Hi, I got the following error with a plugin (definition.json:692):

Code: Select all

In /storage/emulated/0/TheoTown/plugins/japan07/definition.json:

io.blueflower.stapel2d.util.json.JSONException: Expected ':' after Japan7billb at line 3, char 24. Excerpt: 
	{
		"id": [{"Japan7billb"--ERROR->>>,},{"Japan7billb2"}],

Full source: [
	{
		"id": [{"Japan7billb",},{"Japan7billb2"}],
		"type": "animation",
		"frames": [{"bmp": "Japan7billboard.png", "w": 134, "h": 95, "count": 8},{"bmp": "Japanbillboard2.png","w":134,"h":51, "count": 16}],
		"handle interpolation": 6,
		"light": true
	},
  {
   "id":"Japan7Night",
   "frames":[{"bmp":"japan7N1.png"}],
   "type":"animation",
   "light":true, "light switching":true
 },
 {
   "id":"akicom7",
   "type":"commercial",
   "width":6,
   "height":6,
   "animation":[{"id":"Japan7Night", "x":0, "y":-219},{"id": "Japan7billb", "x": 64, "y": -77},{"id": "Japan7billb2", "x":14, "y":-167}],
   "frames":[{"bmp":"japan7.png"}],
   "people":150,
   "level":1,
   "author":"xxx"
 }
]
Device: moto g(6) play (motorola)
OS version: 26

Thank you in advance.
You have an extra comma in the id :)

Code: Select all

"id": [{"Japan7billb"--ERROR->>>,},{"Japan7billb2"}],
The new error log should be easy enough to understand.

Re: [Answered][1.8.41a] Plugin crash (definition.json:692)

Posted: 24 May 2020, 14:15
by CommanderABab
Can you even declare ids as objects {} within an array [] and then having them use the same statements?

@Ølsken

Re: [Answered][1.8.41a] Plugin crash (definition.json:692)

Posted: 24 May 2020, 14:43
by Bearbear76
CommanderABab wrote:
24 May 2020, 14:15
Can you even declare ids as objects {} within an array [] and then having them use the same statements?

@Ølsken
probably not.