Trainz 2022 is breaking the script files I am stumped on this error?

jjeff1955

Active member
<kuid2:95230:107725:4> Monorail Epcot Station V3
Works perfectly in Trainz 2019. Trainz 2022 broke this script with the following error.
Any help would be great?

- <NULL> : File htmlpropertyhandler.gs, Line 696, ER_NullReference
; <NULL> : Script class: HTMLPropertyGroup
; <NULL> : Object: GSGameObject{0x133cc7ce0; class:GSClass{0x1fd7da38: HTMLPropertyGroup}, refcount:2}
; <NULL> : Script callstack
; <NULL> : function $void@HTMLPropertyGroup::AddHandler(HTMLPropertyHandler,string), line 696
; <NULL> : function $void@EpcotPassengerStation::InitPassengerStation(int), line 419
; <NULL> : function $void@EpcotStation::Init(), line 62
; <NULL> : function $void@MeshObject::Init(Asset), line 351
 
I'm guessing your station code was borrowed from an older version of the default script genericpassengerstation.gs.

There are differences between the Trainz+ (22) versions of genericpassengerstation.gs and the TRS19 version and a call to add a handler for this property was removed because it is now done in native code. Why that broke your script is unknown but maybe the Trainz Build you are using is causing a different script validation.

I suggest you just use the class GenericPassengerStation (in genericpassengerstation.gs) and subclass it to provide any extra or changed functionality.
 
Thank You Paul!
I will try the class GenericPassengerStation (in genericpassengerstation.gs)
I will let you know if that works.:)
 
Hello Paul.
I am still working on the Monorail Station to no avail, and 4 Cups of Coffee.
This asset is just weird. it works perfectly in Trainz 2019 with no errors.
I tried what you suggested, and it got rid of that error, the announcement Sounds & Passengers do load, and unload, but the Gates will not open.
It seems to be a trial & error of including the scripts correctly.
I will eventually figure it out. Any more suggestions are most Welcome.
 
...
I tried what you suggested, and it got rid of that error, the announcement Sounds & Passengers do load, and unload, but the Gates will not open.
...

I'm assuming that the "gates' you mention are entrances in the station itself to allow people to embark/disembark a car?

You might try overloading both SetVehicleDoorsOpen() and SetTrainDoorsClosed(() to open/close your gates first and then inherit the rest. On looking at these two functions its not obvious to me why one opens one vehicle's doors and the other closes all the doors in the train. I don't have time to look at that today.
 
Thank You Paul.
I got the gates to finally work with the animated sounds.
Had to look at the builtin GenericPassengerStation script and use some for the code into the epcotstation script with no errors that I know of.
one last issue to finish the patch. This one below.🙁
- <NULL> : File htmlpropertyhandler.gs, Line 696, ER_NullReference
; <NULL> : Script class: HTMLPropertyGroup
; <NULL> : Object: GSGameObject{0x133cc7ce0; class:GSClass{0x1fd7da38: HTMLPropertyGroup}, refcount:2}
; <NULL> : Script callstack
; <NULL> : function $void@HTMLPropertyGroup::AddHandler(HTMLPropertyHandler,string), line 696
; <NULL> : function $void@EpcotPassengerStation::InitPassengerStation(int), line 419
; <NULL> : function $void@EpcotStation::Init(), line 62
; <NULL> : function $void@MeshObject::Init(Asset), line 351

If I can get this issue solve then the passengers properties for the on & off count will work.

Thanks Paul.
No rush on this asset. If you do figure it out for me I will buy you Lunch.
I need to give up for the night anyway, and maybe it will come to me in my sleep,:sleep: sometimes that happens. LOL.
Back on it today, did not come to me in my sleep LOL.:unsure: This asset needs to be repaired for the community as it is important to the
Disney Monorail Project Kit.:)

P.S.
I tried the genericpassengerstation builtin script, and it does not work for the correct sides of the Doors opening & closing.
This type of station requires the original epcotpassengerstation for the Monorail cars side Doors.

The issue is that there are to separate scripts in the main folder with the config file. One will call out the other one, by using the include.gs line.
If I use the passenger station one first then the html properties are working, but the doors do not open, and no announcement sounds, or opening of the Gates. If use the epcotstation one first then call out for the other one everything works, but the html properties will not open in the ? to show the passenger count. Maybe someone has a fix for this?
Thank You for reading my issues.
 
Last edited:
Back
Top