I am made a new category but its cant work and game say not found it? How to fix this problem
Json:
[
{
"id":"$NTR00",
"category":"$mstp",
"type":"road",
"seperator":true,
"level":3,
"speed":3.5,
"title": "Rail",
"text":"Rail for your train",
"frames":[{"bmp":"Rail_1.png","w":32,"h":16,"count":16}],
"bridge frames":[{"bmp":"Bridge.png","w":32,"h":48,"count":12}],
"bridge height":12,
"traffic lights":[{"bmp":"tf.png","w":32,"h":32,"count":4}],
"green phase":3000,
"yellow phase":500,
"price":1000,
"bridge price":150,
"monthly price":50,
"normal flag":false,
"allocate flag":["STP"],
"flag STP":true
},
{
"id":"$mstp",
"type":"category",
"seperator":true,
"title":"Smooth Train Pack",
"frames":[{"bmp":"STP.png"}],
"ordinal":10
},
{
"id":"$Train1_00",
"type":"car",
"seperator":true,
"category":"$mstp00",
"frames":[
{"bmp":"Train_1.png","w":18,"h":17,"count":4}
],
"v2":true,
"flag STP": true
}
]
Category problem :(
- CommanderABab
- AB
- Posts: 11241
- Joined: 07 Jun 2016, 21:12
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Category problem :(
You need to define the category in the json before you can use it like this:
Please note the commented lines near the end regarding "$mstp00".
Code: Select all
[
{
"id":"$mstp",
"type":"category",
"seperator":true,
"title":"Smooth Train Pack",
"frames":[{"bmp":"STP.png"}],
"ordinal":10
},
{
"id":"$NTR00",
"category":"$mstp",
"type":"road",
"seperator":true,
"level":3,
"speed":3.5,
"title": "Rail",
"text":"Rail for your train",
"frames":[{"bmp":"Rail_1.png","w":32,"h":16,"count":16}],
"bridge frames":[{"bmp":"Bridge.png","w":32,"h":48,"count":12}],
"bridge height":12,
"traffic lights":[{"bmp":"tf.png","w":32,"h":32,"count":4}],
"green phase":3000,
"yellow phase":500,
"price":1000,
"bridge price":150,
"monthly price":50,
"normal flag":false,
"allocate flag":["STP"],
"flag STP":true
},
{
"id":"$Train1_00",
"type":"car",
"seperator":true,
"category":"$mstp00", //did you mean $mstp here?
//if not, this category also will not be found.
"frames":[
{"bmp":"Train_1.png","w":18,"h":17,"count":4}
],
"v2":true,
"flag STP": true
}
]