Script error using PathControl

paulper

Active member
Hi all,

I keep getting this error:

PathControl_lib : Thread Exception: ER_NativeCallError, line -1, file path.gse (1)


DETAILS:


Thread Exception: ER_NativeCallError, line -1, file path.gse


Stack dump:


function $int@GameObject::GetId(), line -1
function $void@path::lastTrackSniffer(bool), line 380
function $bool@path::finish(), line 1171
function $void@PathControl_lib::pathHandler(), line 841

Usually it happens at about 10.28 which is annoyingly near the end of my half-hourly cycle on my session that includes over 50 timetabled AI trains. I simply cannot pinpoint the error after trying plenty of times.

Any help with this error would be much appreciated... :)

Thanks,
Paul
 
Hi Paul

You don't mention which path rule you are using. I have made extensive use of the "jsTRF-Path Control" rule and its associated driver commands "PathControl setpath" and "Autodrive" by brummfondel without problems in TS2010 and TS12 but haven't used the ones by _mutton_ which are built into TS12. While I know very little about scripting it may help one of the scripting gurus if you state which of the rules you are using.

If you are using the rule and driver commands successfully earlier in the session then I would suspect a fault either with the trackwork, or possibly in the way the path is set up in the path library. Some of these problems can be extremely difficult to find eg. sometimes pointwork can work in reverse - the green arrow points left but the train goes right or vice versa - in which case the AI may not be able to see the next trackmark that it is being told to drive through or to.

Regards

Brian
 
Thanks Brian. It's brummfondel's I'm talking about. On the whole it behaves perfectly for me in TS12. I use it combined with PathTrigger and UseTimetable to control my 50 odd AI trains, because without it the majority of trains would head in the wrong direction. As you say, it is a pain to try and find the error. I don't know what I changed to cause it, which is the frustrating thing! And to add to that annoyance, it happens at the end of the 30 minute timetable cycle!

Paul
 
Just to let people know I did find a solution to this. The error was being caused when a train would enter a portal. Path Control could not check to see whether that path had been completed because the train had essentially been deleted.

Paul
 
Back
Top