Complaint about new script enforcement on DLS

MSGSapper

Trainz route developer
Before I submit my items to the DLS I almost always do a View Errors and Warnings check in my TRS22 Content Manager to ensure everything is ok. As a matter of course I do not submit till after everything is reported as OK. I recently submitted these two items, which were listed as build 4.7, to the DLS which passed this check:

<kuid:439337:109765> SAP_Old_Grain_Elevator_Wheat_1_PBR
<kuid:439337:109777> SAP_Old_Grain_Elevator_Corn_1_PBR

They were however rejected by the DLS with the following explanation:

Code:
An Error Occured with <kuid:439337:109777> SAP_Old_Grain_Elevator_Corn_1_PBR
<kuid:439337:109777> : VE197: Syntax error in script 'grainelevator.gs' for asset <kuid:439337:109777> "SAP_Old_Grain_Elevator_Corn_1_PBR"
<kuid:439337:109777> : VE267: grainelevator.gs(12) : function GetCompleteIndustryViewDetailsHTMLCode is obsolete in object HTMLWindow.

An Error Occured with <kuid:439337:109765> SAP_Old_Grain_Elevator_Wheat_1_PBR
<kuid:439337:109765> : VE197: Syntax error in script 'grainelevator.gs' for asset <kuid:439337:109765> "SAP_Old_Grain_Elevator_Wheat_1_PBR"
<kuid:439337:109765> : VE267: grainelevator.gs(12) : function GetCompleteIndustryViewDetailsHTMLCode is obsolete in object HTMLWindow.

The following warnings were also recorded. These do not need to be fixed and are provided for information/diagnostic purposes only:
<kuid:439337:109777> : VE267: grainelevator.gs(12) : function GetCompleteIndustryViewDetailsHTMLCode is obsolete in object HTMLWindow.

<kuid:439337:109765> : VE267: grainelevator.gs(12) : function GetCompleteIndustryViewDetailsHTMLCode is obsolete in object HTMLWindow.

Question: Why wasn't this script problem reported by View Errors and Warnings in the TRS22 CM? It doesn't seem to make sense to me that the DLS is going to report script issues that the TRS22 Content Manager does not report which makes it hard to quality control the item(s). I am not objecting here to the script problem, which needs to be fixed, but the apparent lack of synching between the DLS and the TRS22 CM which causes a wasted submission and having to do it over.

FYI I am dealing with the problem at present and have submitted the revised items to the DLS thanks to the help of clam1952 this morning.

Bob
 
Last edited:
I agree with you.
Absolutely a huge problem!:(
I can not upload the recent MKV Monorail Cabs, and cars plus all of the Monorail Stations that have a Script file.
I get the same error that you got, plus the error that "router Post message is obsolete", and the syntax errors.
I can not fix the scripts myself either. There are no good instructions on how to update them to the Trainz 2019,2022 standards.

So what this means is that I have to set the build number to my Monorail cabs and cars to no higher than build 2.9
So that causes the community to not be able to download the completely reworked Monorail system that is so advanced of what it was in the past, unless they have the Trainz 2009 to do the downloads.:eek:

One thing that does work to be able to get them into the 2019,2022 is for the Map to already have them installed and then it will mark them as a unknown dependency, but if you right click on the asset you can download it.

:'(Even though that the older assets such as 1.3 up to 2.9 are still available to download, this new system is going to cause an issue of using the older scripts in newer assets.
 
The CRG has been tasked with updating scripts. With the huge number of assets, they are in dire need of assistance, meaning volunteers, to help wade through the assets. If you have scripting experience, or know someone who does, have them contact the CRG.
 
I agree with you.
Absolutely a huge problem!:(
I can not upload the recent MKV Monorail Cabs, and cars plus all of the Monorail Stations that have a Script file.
I get the same error that you got, plus the error that "router Post message is obsolete", and the syntax errors.
I can not fix the scripts myself either. There are no good instructions on how to update them to the Trainz 2019,2022 standards.

So what this means is that I have to set the build number to my Monorail cabs and cars to no higher than build 2.9
So that causes the community to not be able to download the completely reworked Monorail system that is so advanced of what it was in the past, unless they have the Trainz 2009 to do the downloads.:eek:

One thing that does work to be able to get them into the 2019,2022 is for the Map to already have them installed and then it will mark them as a unknown dependency, but if you right click on the asset you can download it.

:'(Even though that the older assets such as 1.3 up to 2.9 are still available to download, this new system is going to cause an issue of using the older scripts in newer assets.

The fix turned out to be relatively simple and was provided to me courtesy of Clam1952. See this link for the fix:

https://online.ts2009.com/mediaWiki...e_obsolete_script_functions_-_simple_examples

The fix was so trivial in nature that I wonder why N3V even bothered to obsolete the old function which it seems to me is going to cause more problem then the fix is worth IMHO.

In any case I resubmitted the same items with the fix and this time they were accepted by the DLS and should be available for download in about 36 hours or so, but my complaint stills stands however.

Bob
 
Last edited:
My issue is different than that on the Wiki link, but thank you for that link, I did save it for future use.
My issues are Router post message getid. is obsolete.
I tried for hours following the Wiki page on this error.
After I did what it stated to do, I got nothing but parse errors and syntax issues.
This script is for the MKVI Monorail Cab, and Cars also the Epcot, and other Monorail stations.
If anyone has a clue on how to update this issue it would mean that the Monorail system would be at a 3.7 build for all to download.
I have spent 2 month day and night re-doing this Monorail Project to where it looks photo real and all of the Doors and panel lights now work along with panel switch sounds.
Thank You for the info you provided much appreciated.
 
Scripts have always been a problem. Back in the TRS2004 days putting one of my wagons on a layout caused the game to crash if a certain other wagon was there already. The problem was in the scripts one overwrote the other one and I never did find out which wagon had the clash.

Trainz is real time and some script commands aren't as reliable in getting the information back as others hence the need to change things over time.

Hopefully if it meets TS22 standards they should now be more reliable.

Cheerio John
 
My issue is different than that on the Wiki link, but thank you for that link, I did save it for future use.
My issues are Router post message getid. is obsolete.
I tried for hours following the Wiki page on this error.
After I did what it stated to do, I got nothing but parse errors and syntax issues.
This script is for the MKVI Monorail Cab, and Cars also the Epcot, and other Monorail stations.
If anyone has a clue on how to update this issue it would mean that the Monorail system would be at a 3.7 build for all to download.
I have spent 2 month day and night re-doing this Monorail Project to where it looks photo real and all of the Doors and panel lights now work along with panel switch sounds.
Thank You for the info you provided much appreciated.

You need to get acquainted with async. There is in reality one basic call, and the information is returned in a data structure. The problem with most examples is that they are not executable code. For example, they cannot reference the instance of the class you are working in, you have to do that. The examples do help those who are familiar with scripting. Not trying to be harsh, that's just the way it is.
 
No your not harsh at all, I am just dumb founded on how to do it correctly.
What I need to do is learn how to create script files from scratch and then maybe it will sink in.
I do know that these kind of files are very sensitive to what they call a checksum and any thing that gets moved or replace causes those Parse errors.
Thank You for your input pitkin much appreciated.
Cheers!
 
No your not harsh at all, I am just dumb founded on how to do it correctly.
What I need to do is learn how to create script files from scratch and then maybe it will sink in.
I do know that these kind of files are very sensitive to what they call a checksum and any thing that gets moved or replace causes those Parse errors.
Thank You for your input pitkin much appreciated.
Cheers!

Object oriented programming is a hill to climb compared to languages like Basic. Also, TrainzScript is heavily typed. You would probably be better off to start with a textbook about OOP.
 
The TrainzUtil compiler doesn't compile the script until the script has had a change inside of it, so it will re-compile the script only after you made some changes inside of it and submitted those edits to the asset.

At the moment, Rileyzzz is working on a working prototype of an Extension for Visual Studio Code which will remove this step of opening the asset for editing, opening the script, making changes, then submitting the asset, and then re-compiling the script using "View Errors and Warnings".

For now, all you can do is force re-compile the script using the method mentioned above to get the compiler to show you the obsolete methods.
 
Last edited:
Back
Top