[Solved]Problem with road and cars

Plugin specific problems will be solved here.

Moderator: Plugin Moderators

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 2220
Joined: 07 Jul 2016, 22:50
Location: 'Merica
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

[Solved]Problem with road and cars

#1

Post by KINGTUT10101 »

Image
Also, my plug-in won't spawn vehicles. Here's the json:

Code: Select all

[
   {
      "allow bus": false,
      "author": "Kingtut 101 and Theo",
      "flag kttram": true,
      "flag normal": false,
      "frames": [
         {
            "bmp": "tramex.png"
         },
         {
            "bmp": "tramex.png"
         },
         {
            "bmp": "tramex.png"
         },
         {
            "bmp": "tramex.png"
         },
         {
            "bmp": "tramex.png"
         },
         {
            "bmp": "tramex.png"
         },
         {
            "bmp": "tramex.png"
         },
         {
            "bmp": "tramex.png"
         },
         {
            "bmp": "tramex.png"
         },
         {
            "bmp": "tramex.png"
         },
         {
            "bmp": "tramex.png"
         },
         {
            "bmp": "tramex.png"
         },
         {
            "bmp": "tramex.png"
         },
         {
            "bmp": "tramex.png"
         },
         {
            "bmp": "tramex.png"
         },
         {
            "bmp": "tramex.png"
         }
      ],
      "id": "tram.kt101",
      "influence transportation": 5,
      "level": "2",
      "monthly price": 2,
      "price": 60,
      "speed": 2,
      "text": "Used to guide your trams.",
      "title": "Tram Rails",
      "type": "road"
   },
   {
      "author": "Kingtut 101 and Theo",
      "flag kttram": true,
      "flag normal": false,
      "frames": [
         {
            "bmp": "tramkt.png",
            "count": 4,
            "h": 19,
            "w": 20
         }
      ],
      "id": "kttram",
      "type": "car",
      "v2": true
   },
   {
      "author": "Kingtut 101",
      "build time": 0,
      "car": "tram.kt101",
      "car count": 3,
      "car radius": 10000,
      "frames": [
         {
            "bmp": "tramstop1.png"
         },
         {
            "bmp": "tramstop2.png"
         }
      ],
      "height": 1,
      "id": "tramstation.kt101",
      "influence park": 0,
      "monthly price": 5,
      "price": 120,
      "text": "A place for people to get on the tram.",
      "title": "Tram Station",
      "type": "park",
      "width": 1
   }
]

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 2220
Joined: 07 Jul 2016, 22:50
Location: 'Merica
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

#2

Post by KINGTUT10101 »

Okay. When you said "possible flags" in the tutorial I thought that those were examples. Thanks.

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

Platform

#3

Post by Lobby »

But that's not the issue though. The error message basically says that you provide a road where a car is expected. And it's true, you might have to change

Code: Select all

"car": "tram.kt101"
to

Code: Select all

"car": "kttram"
because the id of your car is "kttram" and not "tram.kt101".

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 2220
Joined: 07 Jul 2016, 22:50
Location: 'Merica
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

#4

Post by KINGTUT10101 »

Either way worked for me.

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 2220
Joined: 07 Jul 2016, 22:50
Location: 'Merica
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

#5

Post by KINGTUT10101 »

I added bridges but when I place them they crash the game.

Code: Select all

[
   {
      "allow bus": false,
      "author": "Kingtut 101 and Theo",
      "auto join": false,
      "bridge frames": [
         {
            "bmp": "trambridge.png",
            "count ": 12,
            "h": 48,
            "w": 32
         }
      ],
      "bridge height": 12,
      "bridge price": 120,
      "flag normal": false,
      "flag tram": true,
      "frames": [
         {
            "bmp": "tramrail.png",
            "count": 16,
            "h": 15,
            "w": 32
         }
      ],
      "id": "tramrails.kt101",
      "influence transportation": 5,
      "level": 3,
      "monthly price": 2,
      "price": 60,
      "speed": 2,
      "text": "Used to guide your trams.",
      "title": "Tram Rails",
      "type": "road"
   }
Image

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

Platform

#6

Post by Lobby »

You have a typo in

Code: Select all

"count ": 12, 
as anything between the quotes is attributed to the attribute name, even whitespaces. So change it to

Code: Select all

"count": 12, 
and it should work :)

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 2220
Joined: 07 Jul 2016, 22:50
Location: 'Merica
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

#7

Post by KINGTUT10101 »

Whoops lol
Thanks

Post Reply Previous topicNext topic

Return to “Problems”