Page 1 of 1

[Asked][1.10.63a] Plugin crash (center .json:426)

Posted: 26 Jul 2022, 18:12
by Papijoldan
Hi, I got the following error with a plugin (center .json:426):

Code: Select all

In plugins/sample/center .json:

java.lang.IllegalStateException: When loading "$invstcentr0": Value [{"id":"$center.upgrade2","title":"Office upgrade","text":"Improve trades and unlock gun industry ","frames":[{"bmp":"fhotel.png"}],"price":250000,"monthly price":100,"power":-20,"water":-10,"build time":300,"influence management":10}] at 1 of type io.blueflower.stapel2d.util.json.JSONArray cannot be converted to JSONObject


Thank you in advance.

Re: [Asked][1.10.63a] Plugin crash (center .json:426)

Posted: 26 Jul 2022, 19:31
by CommanderABab
The included code is a valid json:

Code: Select all

[{
	"id": "$center.upgrade2",
	"title": "Office upgrade",
	"text": "Improve trades and unlock gun industry ",
	"frames": [{
		"bmp": "fhotel.png"
	}],
	"price": 250000,
	"monthly price": 100,
	"power": -20,
	"water": -10,
	"build time": 300,
	"influence management": 10
}]

Code: Select all    Reset

[{ "id": "$center.upgrade2", "title": "Office upgrade", "text": "Improve trades and unlock gun industry ", "frames": [{ "bmp": "fhotel.png" }], "price": 250000, "monthly price": 100, "power": -20, "water": -10, "build time": 300, "influence management": 10 }]
JSON checker
Check