<kuid:31293:38050> Script error

RDLOVER777

Aka, WestRail42fan
hello all, i have jfe's monorail demo 2 installed on trainz 2012 but after a EDR today, <kuid:31293:38050> Junction Kit (Right) is flagging up error

Error: Script class does not match asset kind (trackside).

this error is also appearing with the updated versions <kuid2:31293:38050:1> and <kuid2:31293:38050:2> and im honestly pulling hairs out as <kuid:31293:38051> Junction Kit (Left) isn't flagging this error despite having the same scripts and kind "buildable" and type "Junction Kit"
 
Left is TB 2.4 and right one is TB 3.5 hence reason why one is flagged as an error and the other is not.

Error: Script class does not match asset kind (trackside)
I believe this indicates the primary script class inherits from a class that is not suitable to support all the functionality necessary for this kind of asset. In this case the primary script class inherits from MapObject. Probably it should inherit from the SceneryWithTrack class or better perhaps from the Buildable class which inherits from SceneryWithTrack. The parent class for these is MapObject but it lacks some functionality necessary to support this asset directly.

Bob Pearson

[EDIT]
In junctionanimation.gs (in both assets) I'd try changing from
Code:
class JunctionAnimation isclass MapObject
to
Code:
class JunctionAnimation isclass Buildable

[EDIT2]
You probably need to also add this statement with the other includes
Code:
include "buildable.gs"
 
Last edited:
Back
Top