DHR Class B for Trainz

TorenHynes

The Maple Leaf Forever
Hello

I just downloaded the DHR for Trainz. I love it but for one thing...the fireman for the Class B industry interactive locos doesn't work. I get the "A nonfatal script error occured", however whenever I try to make it go away it just keeps popping back up. Its code is:

Thread exemption ER NullReference, Line 229, file

Stack dump:

function $avoid@SteamCabinwithFireman::Attach(GameObject), line -1


How do I get rid of this nasty error code?
 
Last edited:
Toren

My email address is in the config, I might have responded to an email but I am certain that this approach will not have any effect at all. If I do any further work on the B class, it will be to my timetable and that is fairly full.

Peter
 
Peter:

It sounds to me like he doesn't have the latest version OR the latest update to that engine. I got that same error before (in an earlier version of Trainz) and when I applied the update, it got fixed. It is somewhere in the long thread for the DHR.

Bill
 
Yes you're right Bill, there was a script mismatch with the Class B's that were in the original zip files but was fixed with a separate update for the locos. The error originates in the cab script file but the cause is the companion script in the loco does not provide the correct return.

@Toren the fix is to provide the correct script file in the loco's folder. If you get the loco update zip and install those locos it should fix it.

FYI the fireman programmed in the script for the cab works ok up thru TC1/2 IIRC. It won't stoke the fire correctly in TC3 and later versions. The steam physics changed too much for him to work with his current programmed "intelligence". I'm rewriting my cab and loco scripts to be compatible with the new steam physcis and probably be coming out with new versions - maybe not soon but at least later this year. 8-) I'm only working on it occasionally.

In the mean time for use with TC3 thru TS12 I recommend just disabling the fireman when you set out the loco in surveyor. It's also possible to edit the cab script and set the default behavior to be disabled.

Bob Pearson
 
Toren

I apologise for my rather abrupt post. I misunderstood what you wanted. I hope that the other replies have given you what you wanted.

Peter
 
Toren, please check post #281 in this thread: http://forums.auran.com/trainz/show...-is-ready-for-passengers!&p=629665#post629665

It should have the link to the update files for the B Class locos. I checked the dl on the dhr website and the locos in the LM2 file do give script errors when trying to drive in cab mode. I haven't tried the fix to verify it works but from what I rememeber I'm pretty sure it does. For me it's a pain to save the locos which I've modified and then delete everything and reinstall the ones that don't work and then the ones that do to verify everything. I can't do that now nor in the next few days probably but will give it a go when I get back.

Good luck in the mean time.

Bob Pearson
 
Last edited:
I tested no 779 from the package linked to above and the script and engine sounds work - no thread errors thrown.

The loco exhaust sounds are controlled by the script for these versions of the B Class locos. You'll get 4 cuff/rev in both DCC and Cab control with the same setup. For TRS04, 06 and TC1/2 it's the only way to get CAB mode to give the correct cuffs.

If you'd prefer the wrong way (2 cuffs/rev) for some reason post back and I can show you how to get Auran's system back if you need help.

If you'd like to change the syncopation of the exhaust cuffs the script plays for you I can help with that too.

For TC3 thru TS12 I'd recommend changing the engine sound setup to play the new steam sounds and use the new steam physics. Actually I think I owe Peter a new steam container for the B Class. N3V of course screwed up things again in the new physics - the counts 0 and 2 in baseball lingo. Power output and water consumption's wrong in both old and new. I like the new set up better but it needs an overhaul so it simulates real world mechanics and thermodynamics. They had the right idea but something got messed up in the programming.

Bob Pearson
 
Last edited:
Back
Top