Common plugin errors

Plugin specific problems will be solved here.

Moderator: Plugin Moderators

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

Common plugin errors

Post by Bearbear65 » 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! :json
ImageJust my opinion
Theotown forum authoritarian

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

Re: Common plugin errors

Post by The26 » Sat Jun 30, 2018 17:38

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

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

Re: Common plugin errors

Post by CommanderABab » Sat Jun 30, 2018 17:39

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! :json
The26 wrote:
Sat Jun 30, 2018 17:38
Very useful for beginner plugin creators. Great job! :)
Quotes for posperity sake. :)
587587Currently using beta 587. 587 What's new? :)
bus routes are supposed to be fixed!!
:cry:

Telegram - t.me/
🆎️🆎️🆎️🆎️Commander🆎️🆎️

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

Re: Common plugin errors

Post by Between3Characters » Thu Nov 22, 2018 1:42

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

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

Re: Common plugin errors

Post by Lobby » 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":[{...}]
instead of

Code: Select all

"frames":{...}
...Have a nice stay

User avatar
Mrqwerty
Small-town resident
Reactions:
Posts: 28
Joined: Sat Oct 06, 2018 21:48
Location: A-697-SEC.2
Plugins: Show
Version: Beta
Phone model: ASUS P008

Re: Common plugin errors

Post by Mrqwerty » Sun Dec 02, 2018 0:29

Thx :json
WHAT IS THE DEAL WITH AIRPLANE FOOD :calc :bb :bq

User avatar
Ahmad Nur Aizat
TheoTown Veteran
Reactions:
Posts: 7494
Joined: Tue Oct 25, 2016 15:20
Location: Johor Bahru
Plugins: Show
Version: Beta
Phone model: Galaxy J7
Contact:

Re: Common plugin errors

Post by Ahmad Nur Aizat » Wed Dec 05, 2018 3:03

How about the height limit error?

I can't sometimes balance the height required

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

Re: Common plugin errors

Post by Between3Characters » Wed Jan 16, 2019 13:15

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":[{...}]
instead of

Code: Select all

"frames":{...}
I am on the way to make a new park category. I still got an error, even if i already put that on frames. Whats going on? Check the last post in this forum.
Moderators, dont delete our plugins please

Post Reply Previous topicNext topic

Return to “Problems”

Who is online

Users browsing this forum: No registered users and 2 guests