Trainz is breaking the script files SOLVED! Thank You (Paul/pcas1986)

jjeff1955

Active member
I spent hours working on updating a script file for the <kuid2:124017:5006:8> Mill Gondola, 52', WL&G (5700 series), and I got the script updated , and removed the obsolete issues and it works perfectly until I clone it or even make a new asset from it.

I also tried just making a new asset from the original with no changes to the any of the files.
The original will be working perfectly, and when it is cloned it becomes broken creating the RED Bug error warning.
The Trainz 2019, & 2022 will not allow a clone, or new asset to be created with the script files, acts like it is doing a DRM stop issue that disables the scripts.

Her is the result of making a new exact asset! The script gets broken. RED Bug error
---------------------------------------------------
I Did not put the smiley faces in this report. When I saved this to the forum the smiley faces appeared.
The Faces are replacing the Playsound lines and the DecoupleHoses

- <kuid2:95230:120989:3> : empty string at parameter 2 (file world.gs)
; <kuid2:95230:120989:3> : Script class: FCA52Gondola
; <kuid2:95230:120989:3> : MeshObject: <kuid2:95230:120989:3> "Mill Gondola,52'(5700 LLT Series) HD"
; <kuid2:95230:120989:3> : Script callstack
; <kuid2:95230:120989:3> : function $float@World:playSound(Asset,string,float,float,float,GameObject,string,bool), line -1
; <kuid2:95230:120989:3> : function $float@World:playSound(Asset,string,float,float,float,GameObject,string), line 643
; <kuid2:95230:120989:3> : function $void@FCA52Gondola:DecoupleHoses(int,bool), line 134
; <kuid2:95230:120989:3> : function $void@FCA52Gondola::CarMonitor(), line 294
- <kuid2:95230:120989:3> : File world.gs, Line 643, ER_Exception
; <kuid2:95230:120989:3> : Script class: FCA52Gondola
; <kuid2:95230:120989:3> : MeshObject: <kuid2:95230:120989:3> "Mill Gondola,52'(5700 LLT Series) HD"
; <kuid2:95230:120989:3> : Script callstack
; <kuid2:95230:120989:3> : function $float@World:playSound(Asset,string,float,float,float,GameObject,string), line 643
; <kuid2:95230:120989:3> : function $void@FCA52Gondola:DecoupleHoses(int,bool), line 134
; <kuid2:95230:120989:3> : function $void@FCA52Gondola::CarMonitor(), line 294

This is reported when I check for errors.
----------------------------------------------

; <kuid2:95230:120989:3> : Script Compile
; <kuid2:95230:120989:3> : TrainzBaseSpec::CacheScript> <kuid2:95230:120989:3> hierarchy not builtin
; <kuid2:95230:120989:3> : Compiling script 'fca52gondola.gs' for asset <kuid2:95230:120989:3> "Mill Gondola,52'(5700 LLT Series) HD"
; <kuid2:95230:120989:3> : CacheScripts> finished compiling 'fca52gondola.gs' to 'C:/Users/Jon/AppData/Local/N3V Games/trs22/build sx69x2411/cache/libraries/kuid2 95230 120989 3/e287d70c95a202bc.gsl'


This one happens with the Maddy25's intersections of the yarn library. Trainz create a new asset breaks the <kuid2:124017:40002:3> YARN Library.
Then this error happens
Error: PropertyBrowserRefresh() not handled
 
Last edited:
I believe the problem is caused by an empty string for the airOp parameter to PlaySound(). The value of airOp is obtained from an extensions tag called "air_sound-" plus your user id. i.e. there should be a tag called "air_sound-95230" that identifies a sound file.

Can't comment on the YARN library issue. Some of these older scripts need some attention.
 
@pcas1986
Thank You so very much for that fix "air_sound-95230" That did repair it. I would have never figured that out without your help!
That also maybe the answer to the Yarn Lib issue.
 
Glad to be of some help.

I'll look into the YARN library issue. That error is symptomatic of obsolete function calls. That will take some time I suspect.
 
Hello Paul, I got the Yarn Lib to work also.
It was the same issue, I had to put my kuid -95230 in the extensions of the config files of the intersections, and the Yarn Lib.
You have solved all of my issues! I would have never known that this was an issue.
Thank You Paul!
Kind Regards.
 
Curious. As I understood it, the author id isn't supposed to change. Ah well, this is just Trainz making our life interesting. ;)
 
That is why I would not have ever got these assets to work, but you saved the day for me.
I agree I am surprised also that the user id is needed for the file matching of dependencies.
 
Back
Top