[Solved]The error code seems to be incorrect
- BetterBear
- Inhabitant of a Galaxy Cluster
- Posts: 2896
- Joined: 18 Apr 2017, 09:03
- Location: In a place you don't expect.
- Plugins: Showcase Store
- Version: Beta
-
Platform
[Solved]The error code seems to be incorrect
Ok guys, for my 2nd plug in, It tooked me 9 hours and 15 minutes to code the JSON, still not working. I'm getting really angry now. I tried almost everything and it still won't work. So I think the JSON error message is wrong.
- Bearbear76
- Former Bearbear65
- Posts: 5730
- Joined: 10 Feb 2017, 14:53
- Location: L2 cache
- Plugins: Showcase Store
-
Plugin Creator
Platform
Re: The error code seems to be incorrect
pm me the json fileBetterBear wrote:Ok guys, for my 2nd plug in, It tooked me 9 hours and 15 minutes to code the JSON, still not working. I'm getting really angry now. I tried almost everything and it still won't work. So I think the JSON error message is wrong.

- CommanderABab
- AB
- Posts: 11252
- Joined: 07 Jun 2016, 21:12
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
- Bearbear76
- Former Bearbear65
- Posts: 5730
- Joined: 10 Feb 2017, 14:53
- Location: L2 cache
- Plugins: Showcase Store
-
Plugin Creator
Platform
ohCommanderABab wrote:He had extra blanks in some of his tags.
Like
Code: Select all
" type": "commercial" ...

- BetterBear
- Inhabitant of a Galaxy Cluster
- Posts: 2896
- Joined: 18 Apr 2017, 09:03
- Location: In a place you don't expect.
- Plugins: Showcase Store
- Version: Beta
-
Platform
Ehh.... i have one
Commander told it. I had too much blanks.
So do i need the json code to be perfectly blankless?
For example, is this right anymore:

Commander told it. I had too much blanks.
So do i need the json code to be perfectly blankless?
For example, is this right anymore:
Code: Select all
[
{
"id":"idkwhatisthiscommercial",
"author":"betterbearwholovespizza",
"level": 1,
"width": 1,
"height": 1,
"power": -4,
"water": -2,
"frames":[{"bmp":"betterbearfirstcommercial_bmp.pmg"}],
"workers": 6,
"building time": 15
"type":"commercial"
}
]
- Bearbear76
- Former Bearbear65
- Posts: 5730
- Joined: 10 Feb 2017, 14:53
- Location: L2 cache
- Plugins: Showcase Store
-
Plugin Creator
Platform
maybe this should work?BetterBear wrote:Code: Select all
[ { "id":"idkwhatisthiscommercial", "type":"commercial", "author":"betterbearwholovespizza", "level": 1, "width": 1, "height": 1, "power": -4, "water": -2, "frames":[{"bmp":"betterbearfirstcommercial_bmp.pmg"}], "workers":"6", "building time":"15" } ]
Last edited by Bearbear76 on 21 Apr 2017, 11:19, edited 1 time in total.
- BetterBear
- Inhabitant of a Galaxy Cluster
- Posts: 2896
- Joined: 18 Apr 2017, 09:03
- Location: In a place you don't expect.
- Plugins: Showcase Store
- Version: Beta
-
Platform
The error code was for example, "There was an object unterminated (character 139)", then as i delete some of the code the error character just move on, just making all my stuff nonsense.Lobby wrote:I fear that no one of us has a crystal ball 🔮 so we don't know what you tried to do, what happend instead, and why it happened. What's the error code and why do you think it's wrong?
Please consider to share some answers to this questions with us so we may help you.
And i restarted it more that 62 times. Still no success.
- Lobby
- Developer
- Posts: 3719
- Joined: 26 Oct 2008, 12:34
- Plugins: Showcase Store
- Version: Beta
-
Platform
Something like "Hello World" is called a string with content Hello World. Your strings have to match the expectations of the plugin loader. For example
"id " won't work as "id" is expected. Also "iD" won't work as strings are interpreted in a case sensitive way. Spaces outside of strings will be ignored and can therefore be used to improve readability (for human).
Problems like "There was an object unterminated (character 139)" are called syntax errors. They have nothing to do with the data but with the structure of your json file. Such errors can also be detected by this website.
Your latest code seems to have valid syntax, however I suspect that your image has not the file ending .pmg but .png instead.
"id " won't work as "id" is expected. Also "iD" won't work as strings are interpreted in a case sensitive way. Spaces outside of strings will be ignored and can therefore be used to improve readability (for human).
Problems like "There was an object unterminated (character 139)" are called syntax errors. They have nothing to do with the data but with the structure of your json file. Such errors can also be detected by this website.
Your latest code seems to have valid syntax, however I suspect that your image has not the file ending .pmg but .png instead.
- Lookatmemeow
- Metropolitan
- Posts: 123
- Joined: 19 Apr 2017, 23:31
- Location: The litterbox
- Plugins: Showcase Store
-
Platform
- Bearbear76
- Former Bearbear65
- Posts: 5730
- Joined: 10 Feb 2017, 14:53
- Location: L2 cache
- Plugins: Showcase Store
-
Plugin Creator
Platform
- Lookatmemeow
- Metropolitan
- Posts: 123
- Joined: 19 Apr 2017, 23:31
- Location: The litterbox
- Plugins: Showcase Store
-
Platform
Oh no I was talking about the code where there was
Code: Select all
"build time":15
"type": commercial
- BetterBear
- Inhabitant of a Galaxy Cluster
- Posts: 2896
- Joined: 18 Apr 2017, 09:03
- Location: In a place you don't expect.
- Plugins: Showcase Store
- Version: Beta
-
Platform
- CommanderABab
- AB
- Posts: 11252
- Joined: 07 Jun 2016, 21:12
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
That could be from a missing image file. Or an image that does not fit the width and height indicated in the json file.
I got this when it couldn't find the image:
I got this when it couldn't find the image:
Code: Select all
In /storage/emulated/0/TheoTown/plugins/Extras/avocado.json:
java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
- BetterBear
- Inhabitant of a Galaxy Cluster
- Posts: 2896
- Joined: 18 Apr 2017, 09:03
- Location: In a place you don't expect.
- Plugins: Showcase Store
- Version: Beta
-
Platform