## Common plugin errors

Plugin specific problems will be solved here.

Moderator: Plugin Moderators

Bearbear65
Inhabitant of a Universe
Reactions:
Posts: 4594
Joined: Fri Feb 10, 2017 14:53
Plugins: Show
Version: Beta
Phone model: Xperia™ XZ1 SO-01K

### Common plugin errors

Hello!
Here I will list some common plugin errors.
I wrote the solution and the definition of the error message you get when you open Theotown.
This was based on the majority of the plugin errors sent by people

You can help expand this list by writing an error with the solution!

Code: Select all

org.json.JSONException: Unterminated object at character x.
Definition: This means that the plugin wasn't terminated in a specific line. ( doesn't have a comma at the end of a line)
Solution: Add a comma to the line which doesn't include a comma.

Code: Select all

org.json.JSONException: Expected literal value at character x.
Definition: Simply, the opposite of "Unterminated object". Means that you have put a comma in where you didn't have to.
Solution: Remove the extra comma that you added. ( Remember that commas don't precede }] )

Code: Select all

java.lang.IllegalArgumentException: Id x is already in use. Use another id or add "override":true to your plugin.
Definition: Means that the given Id was already in use, in other words a plugin with the same id exists in your plugin folder or Theotown.
Solution: There are many causes for this, e.g. Downloaded a plugin twice, put both the folder and zip inside the plugin folder etc...
So, the easiest way to solve this is by adding "override":true, or changing the id.
If you're trying to replace a in-game building then you must add "override":true, for it to be overridden.

Code: Select all

java.lang.IllegalArgumentException: Cannot fit bmp x.png of size y into world texture (maybe too many plugins?)
Definition: As it says, it means that you have unfortunately reached the limit of the world texture. (space for plugin texture)
Solution: Clean your texture space by deleting unnecessary plugins, or give up on the plugin you wanted to add.

Code: Select all

java.lang.IllegalArgumentException: No category x could be found
Definition: It means that it could not have found the category that is required for the plugin.
Solution: Check if you have downloaded the category. Some plugin creators include the download for the category on the download page, some are
Already in the plugin. In this case it's usually because you have not downloaded the separate category for the plugin. Check the download page once more to see if you can find it.

The best thing to do is not to edit the file unnecessarily!
Just my opinion
Theotown forum authoritarian! pszo48ly

The26
Townsman
Reactions:
Posts: 48
Joined: Wed May 23, 2018 22:18
Location: Bearlandia
Plugins: Show
Version: Beta
Phone model: BearPhone 9000

### Re: Common plugin errors

Very useful for beginner plugin creators. Great job!
Presents are amazing things, and bears are amazing animals.

CommanderABab
AB
Reactions:
Posts: 7702
Joined: Tue Jun 07, 2016 21:12
Plugins: Show
Version: Beta

### Re: Common plugin errors

Bearbear65 wrote:
Sat Jun 30, 2018 11:18
Hello!
Here I will list some common plugin errors.
I wrote the solution and the definition of the error message you get when you open Theotown.
This was based on the majority of the plugin errors sent by people

You can help expand this list by writing an error with the solution!

Code: Select all

org.json.JSONException: Unterminated object at character x.
Definition: This means that the plugin wasn't terminated in a specific line. ( doesn't have a comma at the end of a line)
Solution: Add a comma to the line which doesn't include a comma.

Code: Select all

org.json.JSONException: Expected literal value at character x.
Definition: Simply, the opposite of "Unterminated object". Means that you have put a comma in where you didn't have to.
Solution: Remove the extra comma that you added. ( Remember that commas don't precede }] )

Code: Select all

java.lang.IllegalArgumentException: Id x is already in use. Use another id or add "override":true to your plugin.
Definition: Means that the given Id was already in use, in other words a plugin with the same id exists in your plugin folder or Theotown.
Solution: There are many causes for this, e.g. Downloaded a plugin twice, put both the folder and zip inside the plugin folder etc...
So, the easiest way to solve this is by adding "override":true, or changing the id.
If you're trying to replace a in-game building then you must add "override":true, for it to be overridden.

Code: Select all

java.lang.IllegalArgumentException: Cannot fit bmp x.png of size y into world texture (maybe too many plugins?)
Definition: As it says, it means that you have unfortunately reached the limit of the world texture. (space for plugin texture)
Solution: Clean your texture space by deleting unnecessary plugins, or give up on the plugin you wanted to add.

Code: Select all

java.lang.IllegalArgumentException: No category x could be found
Definition: It means that it could not have found the category that is required for the plugin.
Solution: Check if you have downloaded the category. Some plugin creators include the download for the category on the download page, some are
Already in the plugin. In this case it's usually because you have not downloaded the separate category for the plugin. Check the download page once more to see if you can find it.

The best thing to do is not to edit the file unnecessarily!
The26 wrote:
Sat Jun 30, 2018 17:38
Very useful for beginner plugin creators. Great job!
Quotes for posperity sake.
759!🆎️

Between3Characters
Metropolitan
Reactions:
Posts: 127
Joined: Thu Oct 04, 2018 13:31
Plugins: Show
Version: Beta
Phone model: 082155558223 redmi4a

### Re: Common plugin errors

What about the jsonobject cannot be converted to jsonarray? I got that problem, but then i check syntax and it says valid.... Or did i miss something? For example, image? Its a category though..
Moderators, dont delete our plugins please

Lobby
Developer
Reactions:
Posts: 3345
Joined: Sun Oct 26, 2008 12:34
Plugins: Show
Version: Beta
Phone model: S7 edge

### Re: Common plugin errors

You probably used {} where [] is needed. E.g. you might have forgot to put [] around a frame:

Code: Select all

"frames":[{...}]

Code: Select all

"frames":{...}
...

Mrqwerty
Inhabitant of a Conurbation
Reactions:
Posts: 461
Joined: Sat Oct 06, 2018 21:48
Location: VER-MONT!
Plugins: Show
Version: Beta
Phone model: 2003 LG flip phone

### Re: Common plugin errors

Thx
DO NOT PRESS

TheoTown Veteran
Reactions:
Posts: 8134
Joined: Tue Oct 25, 2016 15:20
Location: Johor Bahru
Plugins: Show
Version: Beta
Phone model: Galaxy A50
Contact:

### Re: Common plugin errors

How about the height limit error?

I can't sometimes balance the height required

Between3Characters
Metropolitan
Reactions:
Posts: 127
Joined: Thu Oct 04, 2018 13:31
Plugins: Show
Version: Beta
Phone model: 082155558223 redmi4a

### Re: Common plugin errors

Lobby wrote:
Thu Nov 22, 2018 1:51
You probably used {} where [] is needed. E.g. you might have forgot to put [] around a frame:

Code: Select all

"frames":[{...}]
"frames":{...}