[Solved]I badly need help

Plug-in related stuff can be discussed here.

Moderator: Plugin Moderators

User avatar
Mayor Jeffrey IX
TheoTown Cartographer
Reactions:
Posts: 988
Joined: 05 Apr 2017, 16:48
Location: Right here
Plugins: Showcase Store

Platform

[Solved]I badly need help

#1

Post 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.
Last edited by Mayor Jeffrey IX on 06 Apr 2017, 12:59, edited 1 time in total.

User avatar
Sometheotown mayor
Has uncountable inhabitants
Reactions:
Posts: 1548
Joined: 28 Jan 2017, 21:37
Location: Somewhere in the middle of russia
Plugins: Showcase Store

Platform

#2

Post by Sometheotown mayor »

Could we see the entire code

User avatar
Mayor Jeffrey IX
TheoTown Cartographer
Reactions:
Posts: 988
Joined: 05 Apr 2017, 16:48
Location: Right here
Plugins: Showcase Store

Platform

#3

Post 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.

User avatar
Lobby
Developer
Reactions:
Posts: 3705
Joined: 26 Oct 2008, 12:34
Plugins: Showcase Store
Version: Beta

Platform

#4

Post 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.

User avatar
Mayor Jeffrey IX
TheoTown Cartographer
Reactions:
Posts: 988
Joined: 05 Apr 2017, 16:48
Location: Right here
Plugins: Showcase Store

Platform

#5

Post 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?

User avatar
Lobby
Developer
Reactions:
Posts: 3705
Joined: 26 Oct 2008, 12:34
Plugins: Showcase Store
Version: Beta

Platform

#6

Post 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.

User avatar
CommanderABab
AB
Reactions:
Posts: 11086
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

#7

Post 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 🆎.

User avatar
Mayor Jeffrey IX
TheoTown Cartographer
Reactions:
Posts: 988
Joined: 05 Apr 2017, 16:48
Location: Right here
Plugins: Showcase Store

Platform

#8

Post 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.

User avatar
Bearbear76
Former Bearbear65
Reactions:
Posts: 5730
Joined: 10 Feb 2017, 14:53
Location: L2 cache
Plugins: Showcase Store

Plugin Creator

Platform

#9

Post by Bearbear76 »

Maybe use this as a sample
Image

User avatar
Mayor Jeffrey IX
TheoTown Cartographer
Reactions:
Posts: 988
Joined: 05 Apr 2017, 16:48
Location: Right here
Plugins: Showcase Store

Platform

#10

Post by Mayor Jeffrey IX »

What program is that?

User avatar
Bearbear76
Former Bearbear65
Reactions:
Posts: 5730
Joined: 10 Feb 2017, 14:53
Location: L2 cache
Plugins: Showcase Store

Plugin Creator

Platform

#11

Post 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

User avatar
Bearbear76
Former Bearbear65
Reactions:
Posts: 5730
Joined: 10 Feb 2017, 14:53
Location: L2 cache
Plugins: Showcase Store

Plugin Creator

Platform

#12

Post by Bearbear76 »

If you want to make it into a management plugin just change the education to management

User avatar
Mayor Jeffrey IX
TheoTown Cartographer
Reactions:
Posts: 988
Joined: 05 Apr 2017, 16:48
Location: Right here
Plugins: Showcase Store

Platform

#13

Post 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.

User avatar
Bearbear76
Former Bearbear65
Reactions:
Posts: 5730
Joined: 10 Feb 2017, 14:53
Location: L2 cache
Plugins: Showcase Store

Plugin Creator

Platform

#14

Post 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

User avatar
Bearbear76
Former Bearbear65
Reactions:
Posts: 5730
Joined: 10 Feb 2017, 14:53
Location: L2 cache
Plugins: Showcase Store

Plugin Creator

Platform

#15

Post by Bearbear76 »

Sorry I think is

Code: Select all

"type":"public",

User avatar
Bearbear76
Former Bearbear65
Reactions:
Posts: 5730
Joined: 10 Feb 2017, 14:53
Location: L2 cache
Plugins: Showcase Store

Plugin Creator

Platform

#16

Post 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"
}
]


User avatar
Bearbear76
Former Bearbear65
Reactions:
Posts: 5730
Joined: 10 Feb 2017, 14:53
Location: L2 cache
Plugins: Showcase Store

Plugin Creator

Platform

#17

Post 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" 
} 
] 

User avatar
CommanderABab
AB
Reactions:
Posts: 11086
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

#18

Post by CommanderABab »

Whitespace like blanks are ignored, doesn't matter how many are there.

User avatar
Mayor Jeffrey IX
TheoTown Cartographer
Reactions:
Posts: 988
Joined: 05 Apr 2017, 16:48
Location: Right here
Plugins: Showcase Store

Platform

#19

Post 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!

User avatar
Bearbear76
Former Bearbear65
Reactions:
Posts: 5730
Joined: 10 Feb 2017, 14:53
Location: L2 cache
Plugins: Showcase Store

Plugin Creator

Platform

#20

Post 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

Post Reply Previous topicNext topic

Return to “Plug-In Discussion”