Script Error I Cannot Fix

DennR

Active member
Hi,

I have been working on a session for the Mojave Sub built in route in TS12 B61388 and I have encountered a scrip error that I have been unable to fix :n: so I turn to you good people for some help.

Page 1
WaitUntilSVariableCommand : Thread Exception: ER_NativeCallError, line -1, file waituntilsvariablecommand.gs (3)
Page 2
Thread Exception: ER_NativeCallError, line -1, file waituntilsvariablecommand.gs

Stack dump:

function $int@GameObject::GetId(), line -1
function $void@WaitUntilSVariableCommand::CheckSchedule(Variables,Train), line 13

the problem is that I have set up session variables and an Input Table with the svar change states.

I have an AI Driver with a schedule to start in rotabile invisible the at svar=1 move to a loco in MJ Yard, move a consist and stop. next as the player approaches the consist the AI Driver uncouples from the consist and moves around to couple a different consist of tankers waiting in the Yard.

All of that works well but then I have wait 10 seconds move to loco (rotable invisible) wait 20 seconds then delete train.

This final sequence works but at the start of the 20 second wait the dreaded red bug appears every time.

I have tried changing the invisible loco for a parked loco, I have replaced the loco's to which the AI Driver moves and later leaves. I have checked the tankers and they are all OK no errors and the loads are all built in and and they are all installed. I have tried a force updating the script cache as suggested by NS37 in an older thread.

I have also checked the operation with the Player stationary and no other trains active with the Player train doing it's routine in the session and the bug always appears at the same point.

This evening I have searched the TS12 directory for waituntilsvariablecommand.gs but all the Windows Explorer searches indicate that there is no such file I have also looked in both jetlog files and there is no indication of a problem with the commands and rules I am using or with the rolling stock involved in the schedule.

Any suggestions would be very much appreciated because this is the last glitch preventing us Ettore48 and myself uploading the sessions to the DLS.

Cheers,
Bob:Y:
 
Hi Bob: WaitUntilSVariable is a built-in driver command <kuid2:131986:1006:1> by atilabarut. You can find the scripts by opening the asset in CMP and editing in explorer.

The asset code is trying to get the ID ( GetId() ) of the deleted train and that is causing the exception. Can you try some other means of disposing of the AI train?

If you need further help could you PM me please?

Cheers - Trevor
 
Thanks Trevor,

I will go and investigate the driver command and see if I can make sense if the scrip without bothering you further.

As a test I changed from the rotabile invisible to an Auran loco DD40X parked on a spur on the route but the same error appeared.

Thanks Again and Cheers,
Bob
 
Hi,

Today I have tried deleting all the rules and commands associated with the problem schedule and that failed to fix the issue so I placed the invisible loco on a different track but no effect so I replaced the invisible loco with the default UP SD40-2 and that still produced the identical script error. I am at a complete loss as to the cause of this problem.

I posted the error here rather than in the TS12 forum because the error is also reported by a Beta Tester in MAC2 as well as the others with TS12 HF4.

I have now run out of ideas about what could be causing this gremlin. OH I forgot to mention a made a simple test session and the schedule worked perfectly with all the same assets and I a certain that the last time the red bus appeared it smiled at me!:)
 
a shot in the dark - The only time I have had a red spider on the Mojave is when I edited session and forgot that the 'instant load' command was still in force and I had loaded the rolling stock with other commodities, perhaps you have a similar error ?
 
Hi Trevor,

the red bug seems to appear before the train vanishes :(. The driver is on a couple engines that couple to the rear of a departing train to act as pushers. Since the player will couple to the same train at a later time, no driver should be there. The driver is then moved to another locomotive last four orders it has are:

Wait Until System Variable (waits until the required condition has occurred)
Move to Loco (moves to the invisible loco)
Wait 20 seconds
Delete Train (the invisible loco, and the driver, are deleted).


 
a shot in the dark - The only time I have had a red spider on the Mojave is when I edited session and forgot that the 'instant load' command was still in force and I had loaded the rolling stock with other commodities, perhaps you have a similar error ?

Hi,

I had thought of the load Queues being a problem but the string we are connecting to is all Tankers and they all have the same load queues but they are empty Load "0".

So full marks for the thought but sadly this has deeper roots than the assets, their dependencies and their loads.

Cheers,
Bob
 
@ Pendolino - Thanks for helping. Bob has sent me the session and I am trying to reproduce the error. At this stage I am still downloading assets required for the session.

Cheers - Trevor
 
I would like to provide my thanks and those of my co-author Errore48 to Trev999 for his help and patients with me while he identified the problem and solved it with a new driver command that he has kindly submitted to the DSL so we can maintain the DSL only status of the pair of sessions we have been creating and plan to put up on the DLS shortly.

Thanks again I have learnt a lot and we are very grateful for your support and the other great commands and rules you have placed on the DLS for us all to enjoy.

Cheers,
Bob:)
 
Back
Top