Page 1 of 1

✅Road plugin crash

Posted: 17 Apr 2018, 15:50
by _JS_
When i try to open the road menu it literally crashes. I'm trying to test my first plugin (a road plugin) but the game crashes. Why? :(

Re: Why?

Posted: 17 Apr 2018, 17:36
by Lobby
Without any code we can only do guessing on why it happens. You have to invest time to give more details about your plugin if you want anyone to help you.

Other than that, I think this stacktrace could be yours:
Screenshot_20180417-173517.png
It says that you don't provide enough frames.

Re: Why?

Posted: 17 Apr 2018, 20:00
by _JS_
Lobby wrote:
17 Apr 2018, 17:36
Without any code we can only do guessing on why it happens. You have to invest time to give more details about your plugin if you want anyone to help you.

Other than that, I think this stacktrace could be yours:
Screenshot_20180417-173517.png
It says that you don't provide enough frames.
I don't have any code, it just says:
TheoTown stopped working
Btw thx for your help :)

Re: Road plugin crash

Posted: 17 Apr 2018, 20:25
by _JS_
I'm new on JSON and plugins. I work with JSON genie and idk too much about this. I have this on frames:

Re: Road plugin crash

Posted: 17 Apr 2018, 22:03
by Lobby
Json code, that's what I've meant. It would be easier to read if you provide it as raw text.

You have to provide 16 frames, but right now you provide only one. How your json code should look like depends on how the image file looks like. Have you followed the tutorial about roads?

Re: Road plugin crash

Posted: 17 Apr 2018, 22:12
by CommanderABab
Json genie has an option to show the json code.

Re: Road plugin crash

Posted: 17 Apr 2018, 22:14
by _JS_
Lobby wrote:
17 Apr 2018, 22:03
Json code, that's what I've meant. It would be easier to read if you provide it as raw text.

You have to provide 16 frames, but right now you provide only one. How your json code should look like depends on how the image file looks like. Have you followed the tutorial about roads?
I didn't knew there was a tutorial about roads.
I will read it, thanks :)

Re: Road plugin crash

Posted: 17 Apr 2018, 22:15
by _JS_
CommanderABab wrote:
17 Apr 2018, 22:12
Json genie has an option to show the json code.
Oh i didn't knew that, Thanks :)

Re: Road plugin crash

Posted: 17 Apr 2018, 22:18
by _JS_
There you go :)

Re: Road plugin crash

Posted: 17 Apr 2018, 22:26
by CommanderABab
Now show us country_road.png and dirt_road.png.

The frames statements should look like this if they are 16 tiles.

Code: Select all

"frames":[{"bmp":"dirt_road.png", "w":32,"count":16}]

Re: Road plugin crash

Posted: 17 Apr 2018, 23:11
by CommanderABab
Also needs

Code: Select all

"speed":#,
if you want to faster than a normal road. # would be 1.1 to 2 for the dirt road because the default one has a speed of 1.

Re: Road plugin crash

Posted: 18 Apr 2018, 06:34
by _JS_
CommanderABab wrote:
17 Apr 2018, 22:26
Now show us country_road.png and dirt_road.png.

The frames statements should look like this if they are 16 tiles.

Code: Select all

"frames":[{"bmp":"dirt_road.png", "w":32,"count":16}]