Page 1 of 2

[Solved]I badly need help

Posted: 05 Apr 2017, 16:58
by Mayor Jeffrey IX
Hello there! I've been playing Theotown for a few months now. I need help with plugins, though. Every time I make a plugin, (I follow the directions closely) I get this Error page:Image
Please help me.

Posted: 05 Apr 2017, 17:00
by Sometheotown mayor
Could we see the entire code

Posted: 05 Apr 2017, 18:29
by Mayor Jeffrey IX
Ah yes. Here is the code.
Image
The problem is, it seems that if I make or edit an existing plugin, I get this message.

Posted: 05 Apr 2017, 19:26
by Lobby
To me the error message looks like a coding problem. Maybe you can upload also the content of the json file instead of an image showing it. About coding, something like UTF-8 should work. You might consider to use another text editor to modify the json file.

Posted: 05 Apr 2017, 23:05
by Mayor Jeffrey IX
Okay. Sorry, but I'm new at this stuff.Two questions:
1. What is UTF-8?
2. How do I upload stuff?

Posted: 05 Apr 2017, 23:30
by Lobby
1. If you don't know what it is then it's difficult to talk about it. You may find out more about it in the Wikipedia article. Short version: There are different ways on how one can save text files. Usually, not all are supported by all programs.

2. Do you know what Copy and Paste is? Select the content of the json file, copy it, create a new post here, and paste the contents into it.

Posted: 05 Apr 2017, 23:33
by CommanderABab
You might have unicode characters not supported by the game in the json file.

For example, a web game I play will break for a player if they use any unicode character that starts with hex F in the three byte unicode. Such as 🆎.

Posted: 06 Apr 2017, 02:02
by Mayor Jeffrey IX
I feel like an idiot :oops:
Thanks. Oddly enough, I can't paste it though.........
Also, in that error log file I see the black diamond with the question mark in it, so there it some UTF-8 symbols in it. Thank you.
I will look closely for them.

Posted: 06 Apr 2017, 02:59
by Bearbear76
Maybe use this as a sample
Image

Posted: 06 Apr 2017, 03:24
by Mayor Jeffrey IX
What program is that?

Posted: 06 Apr 2017, 03:29
by Bearbear76
Mayor Jeffrey IX wrote:What program is that?
json you use it to make plugins
Or if your talking about what it is it's a plugin json for education

Posted: 06 Apr 2017, 03:31
by Bearbear76
If you want to make it into a management plugin just change the education to management

Posted: 06 Apr 2017, 03:34
by Mayor Jeffrey IX
Okay, I've found out I'm using "UTF-8" symbols. Can you show me symbols that I can use?
Apparently JSON cannot read certain symbols.

Posted: 06 Apr 2017, 03:42
by Bearbear76
Mayor Jeffrey IX wrote:Okay, I've found out I'm using "UTF-8" symbols. Can you show me symbols that I can use?
Apparently JSON cannot read certain symbols.
it should look something​ like this
Sorry if it's wrong
Image

Posted: 06 Apr 2017, 03:54
by Bearbear76
Sorry I think is

Code: Select all

"type":"public",

Posted: 06 Apr 2017, 04:10
by Bearbear76
This will work edit as you like :wink:

Code: Select all

[
{
"id":"RadioStation",
"frames":[{"bmp":"radio.png"}],
"width":3,
"height":3,
"type":"public",
"influence management":"55",
"influence park":"25",
"max count":"5",
"Build time":"25",
"title":"test radio",
"text":"test",
"price":"1500",
"monthly price":"250"
}
]


Posted: 06 Apr 2017, 09:19
by Bearbear76
former member_danevich wrote:
Mayor Jeffrey IX wrote:Ah yes. Here is the code.
Image
The problem is, it seems that if I make or edit an existing plugin, I get this message.
I think that you shouldn't put gaps after colons
it's ok he can just copy this

Code: Select all

[ 
{ 
"id":"RadioStation", 
"frames":[{"bmp":"radio.png"}], 
"width":3, 
"height":3, 
"type":"public", 
"influence management":"55", 
"influence park":"25", 
"max count":"5", 
"Build time":"25", 
"title":"test radio", 
"text":"test", 
"price":"1500", 
"monthly price":"250" 
} 
] 

Posted: 06 Apr 2017, 09:28
by CommanderABab
Whitespace like blanks are ignored, doesn't matter how many are there.

Posted: 06 Apr 2017, 12:42
by Mayor Jeffrey IX
I think I found my problem. What I do is make a .doc file, edit the file with a normal file editor (like MS Word), then change the extension to .json. I can see how that wouldn't work.
Thanks for the help and the code!

Posted: 06 Apr 2017, 12:44
by Bearbear76
Mayor Jeffrey IX wrote:I think I found my problem. What I do is make a .doc file, edit the file with a normal file editor (like MS Word), then change the extension to .json. I can see how that wouldn't work.
Thanks for the help and the code!
Ok :D