Page 1 of 1

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

Posted: 10 May 2020, 07:36
by Sergio2203
Hi, I got the following error with a plugin (definition.json:645):

Code: Select all

In /storage/emulated/0/TheoTown/plugins/IKEA store 1/definition.json:

io.blueflower.stapel2d.util.json.JSONException: Expected literal value at line 31, char 1. Excerpt: 
   "v2":true,
--ERROR->>> }

Full source: [
  {
   "id":"Ikean1",
   "frames":[{"bmp":"IKEAstoreN1.png"}],
   "type":"animation",
   "light":true, "light switching":true
 },
 {
   "id":"IKEA store 1",
   "type":"commercial",
   "width":4,
   "height":4,
   "car spawner":[{"cars":["$$camionikea00"],
   "animation":[{"id":"Ikean1", "x":0, "y":-43}],
   "frames":[{"bmp":"IKEAstore.png"}],
   "people":0,
   "level":1,
   "author":"xxx"
 },
 {
   "capacity":6,
   "flag normal":true,
   "flag user2":true,
   "frames":[{"bmp":"camion ikea.png",
   "count":4,"h":14,"w":17}],
   "id":"$$camionikea00",
   "influence passenger bus":12,
   "speed":1.1,
   "type":"car",
   "v2":true,
 }
  
]
Device: moto g(6) play (motorola)
OS version: 26

Thank you in advance.

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

Posted: 10 May 2020, 12:14
by CommanderABab
Sergio2203 wrote:
10 May 2020, 07:36
Hi, I got the following error with a plugin (definition.json:645):

Code: Select all

In /storage/emulated/0/TheoTown/plugins/IKEA store 1/definition.json:

io.blueflower.stapel2d.util.json.JSONException: Expected literal value at line 31, char 1. Excerpt: 
   "v2":true,
--ERROR->>> }

Full source: <..> Device: moto g(6) play (motorola)
OS version: 26

Thank you in advance.
}] was missing in car spawner statement:

Code: Select all

[
  {
   "id":"Ikean1",
   "frames":[{"bmp":"IKEAstoreN1.png"}],
   "type":"animation",
   "light":true, "light switching":true
 },
 {
   "id":"IKEA store 1",
   "type":"commercial",
   "width":4,
   "height":4,
   "car spawner":[{"cars":["$$camionikea00"]}],
   "animation":[{"id":"Ikean1", "x":0, "y":-43}],
   "frames":[{"bmp":"IKEAstore.png"}],
   "people":0,
   "level":1,
   "author":"xxx"
 },
 {
   "capacity":6,
   "flag normal":true,
   "flag user2":true,
   "frames":[{"bmp":"camion ikea.png","count":4,"h":14,"w":17}],
   "id":"$$camionikea00",
   "influence passenger bus":12,
   "speed":1.1,
   "type":"car",
   "v2":true,
 }
  
]

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

Posted: 10 May 2020, 20:15
by Sergio2203
could you help me what should i put please

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

Posted: 11 May 2020, 01:28
by CommanderABab

Code: Select all

[
  {
   "id":"Ikean1",
   "frames":[{"bmp":"IKEAstoreN1.png"}],
   "type":"animation",
   "light":true, "light switching":true
 },
 {
   "id":"IKEA store 1",
   "type":"commercial",
   "width":4,
   "height":4,
   "car spawner":[
     {
       "cars":["$$camionikea00"],  
       "flags": ["lkw"],
       "count":36,
       "radius":1300        
     }
   ],
   "animation":[{"id":"Ikean1", "x":0, "y":-43}],
   "frames":[{"bmp":"IKEAstore.png"}],
   "people":0,
   "level":1,
   "author":"xxx"
 },
 {
   "capacity":6,
   "flag normal":true,
   "flag user2":true,
   "frames":[{"bmp":"camion ikea.png","count":4,"h":14,"w":17}],
   "id":"$$camionikea00",
   "influence passenger bus":12,
   "speed":1.1,
   "type":"car",
   "v2":true,
 }
  
]
This would probably work as you intended.