Load Error tests ok Version 3220
#1
Posted 18 August 2015 - 04:54 PM
I've closed and restarted the main window and yet the same odd conditions apply.
Is there anything I can do to clear this anomaly on my own?
#2
Posted 18 August 2015 - 09:47 PM
#3
Posted 19 August 2015 - 08:54 AM
ATW, on 18 August 2015 - 09:47 PM, said:
No, but the edits have been extensive and such an error did occur -- and was corrected. The problem is the Test function has no problem running the activity but the game itself won't.
I've also found the same problem in a different directory tree, different route, different locomotive. In the later case it was a type... an include referenced a filename using a 1 instead of a 4. The typo was corrected, the file is there, but the game continues to report a problem as cannot locate a filename with a 1 in it.
#4
Posted 22 August 2015 - 05:55 PM
The .eng file: Include ( "..\\Common_Model_Stds\ALCO_S2_Stds_Allen_Norton_Model\S2_Locomotive_Specs.inc" )
I don't see anything wrong as the file exists as named and located. Is the full path longer than OR expects?
#5
Posted 22 August 2015 - 06:23 PM
Genma Saotome, on 22 August 2015 - 05:55 PM, said:
The .eng file: Include ( "..\\Common_Model_Stds\ALCO_S2_Stds_Allen_Norton_Model\S2_Locomotive_Specs.inc" )
I don't see anything wrong as the file exists as named and located. Is the full path longer than OR expects?
MSTS chokes on more than 30 characters. ALCO_S2_Stds_Allen_Norton_Model is 31 characters.
Actually MSTS truncates so ALCO_S2_Stds_Allen_Norton_Model becomes ALCO_S2_Stds_Allen_Norton_Mode in MSTS.
#6
Posted 22 August 2015 - 08:20 PM
#7
Posted 22 August 2015 - 08:27 PM
"..\\Common_Model_Stds\ALCO_S2_Stds_Allen_Norton_Model\S2_Locomotive_Specs.inc"
Notice how there's two backslashes at the beginning but only one for all the others? I just fixed a sound config today that I made a similar error in some years ago. Your line should read either:
"..\Common_Model_Stds\ALCO_S2_Stds_Allen_Norton_Model\S2_Locomotive_Specs.inc"
or
"..\\Common_Model_Stds\\ALCO_S2_Stds_Allen_Norton_Model\\S2_Locomotive_Specs.inc"
#8
Posted 23 August 2015 - 06:02 AM
#9
Posted 23 August 2015 - 09:47 AM
James Ross, on 23 August 2015 - 06:02 AM, said:
I tried that and nothing changed. I also tried single \ everywhere as well as removing the leading and trailing quotes. In all cases the constructed path as shown in the error data had the leading pair of .. characters present and after that no \ anywhere.
I expect it is a simple error to correct... I'm just not seeing what it is. Oh, wait... this is the first time I'm using an include statement that describes two directories within the statement. Could that be what's causing this?
Do you want a copy of the files?
#10
Posted 23 August 2015 - 02:07 PM
Genma Saotome, on 23 August 2015 - 09:47 AM, said:
I expect it is a simple error to correct... I'm just not seeing what it is. Oh, wait... this is the first time I'm using an include statement that describes two directories within the statement. Could that be what's causing this?
Do you want a copy of the files?
It should definitely be double backslashes, and the error exactly matches up to the version you quoted. Certain the file you're editing is the one OR is reading? Nothing else matches up with the error given and the alternate forms you mention should not be producing the same thing. It's very unlikely to be anything to do with the number of directories in the include (if it is, it's probably a general parsing problem and not specific to include).
#11
Posted 24 August 2015 - 11:01 AM
Genma Saotome, on 22 August 2015 - 05:55 PM, said:
The .eng file: Include ( "..\\Common_Model_Stds\ALCO_S2_Stds_Allen_Norton_Model\S2_Locomotive_Specs.inc" )
I don't see anything wrong as the file exists as named and located. Is the full path longer than OR expects?
I would expect an error message to include the slash marks as specified by the path.
#12
Posted 24 August 2015 - 11:55 AM
copperpen, on 24 August 2015 - 11:01 AM, said:
I would expect an error message to include the slash marks as specified by the path.
Exactly. Their absence suggests to me a parsing error; perhaps the code is written to accept one and only one \ character as the means to avoid problems when given "..\\". That would be fine in all situations where the relative directory does not contain any sub directories but would fail whenever there was.
FWIW the error occurs w/o regard to how many \ characters are present -- one in all positions, two in all positions, two at the start followed by one further down the path.
Something else I've noticed is the include statements in the Wagon() section appear to work as expected (no error messages are thrown). It is only those in the Engine() section that fail.
Here is the full .eng:
SIMISA@@@@@@@@@@JINX0D0t______ Wagon ( S-2_SP_1300db Type ( Engine ) WagonShape ( S-2_SP_1300db.s ) Include ( "..\Common_Model_Stds\ALCO_S2_Stds_Allen_Norton_Model\S2_Mesh.inc" ) Include ( "..\Common_Fleet_Stds\Std_Late_Steam_Era_Diesel_Switcher_Coupler.inc" ) Include ( "..\Common_Model_Stds\ALCO_S2_Stds_Allen_Norton_Model\S2_Weight.inc" ) Include ( "..\Common_Model_Stds\ALCO_S2_Stds_Allen_Norton_Model\S2_Locomotive_Brake.inc" ) Include ( "..\Common_Model_Stds\ALCO_S2_Stds_Allen_Norton_Model\S2_Lights.inc" ) AntiSlip () Sound ( ALS4eng.sms ) ) Engine ( S-2_SP_1300db Effects ( DieselSpecialEffects ( Exhaust1 ( -0.33 4.58 -0.89 0 1 0 .1 ) ) ) Wagon ( S-2_SP_1300db ) Include ( "..\\Common_Model_Stds\\ALCO_S2_Stds_Allen_Norton_Model\\S2_Locomotive_Specs.inc" ) Include ( "..\Common_Model_Stds\ALCO_S2_Stds_Allen_Norton_Model\S2_Locomotive_Controllers.inc" ) Include ( "..\Common_Model_Stds\ALCO_S2_Stds_Allen_Norton_Model\S2_Monitors.inc" ) Include ( "..\Common_Model_Stds\ALCO_S2_Stds_Allen_Norton_Model\S2_Air_Compressor.inc" ) CabView ( GenSx-rear.cvf ) Headout ( 1.6 3.4 -4.9 ) DieselSmokeEffectInitialMagnitude( 1 ) DieselSmokeEffectMaxMagnitude( 2 ) DieselSmokeEffectInitialSmokeRate( 1 ) DieselSmokeEffectMaxSmokeRate( 4 ) BrakesEngineBrakeType( "Air_single_pipe" ) BrakesTrainBrakeType( "Air_single_pipe" ) BrakesEngineControllers( "Independent, Train" ) Brake_Engine ( 0 1 0.05 0 NumNotches ( 2 Notch ( 0 0 EngineBrakesControllerReleaseStart ) Notch (0.1 1 EngineBrakesControllerApplyStart ) ) ) Brake_Train ( 0 1 0.0125 0.4 NumNotches ( 5 Notch ( 0 0 TrainBrakesControllerReleaseStart ) Notch ( 0.3 1 TrainBrakesControllerGraduatedSelfLapLimitedStart ) Notch ( 0.85 0 TrainBrakesControllerSuppressionStart ) Notch ( 0.9 0 TrainBrakesControllerContinuousServiceStart ) Notch ( 0.95 0 TrainBrakesControllerEmergencyStart ) ) ) comment( fuel_level ) EngineVariables ( 600 ) Sound ( ALS4cab.sms ) Name ( "SP #1300 S-2 basic black" ) )
I'll be moving the brake parameters into a brakestand include file once this problem is resolved which should leave this .eng at 51 or 52 lines.
#13
Posted 26 August 2015 - 09:28 AM
Genma Saotome, on 24 August 2015 - 11:55 AM, said:
Everything works fine for me in X3227 if I use double backslashes. If I use any single backslashes, it fails to load that particular item. I really don't know how your having the problems you describe, given my expectations and, now, experience. :(
This is the file I have which works perfectly in my tests:

Number of downloads: 264
The only changes are:
- Every include uses only double backslashes
- I added a "Type" section in "Engine" to satisfy OR's code without having to write any of the include files (mine are all 0 bytes)
And that loads and the game runs.
Genma Saotome, on 24 August 2015 - 11:55 AM, said:
This is because the loading code parses only the "Engine" section initially, to figure out if the file is a wagon or engine and what type of engine it is. After that succeeds, it parses the whole file. So if it chokes on an include in "Engine", it'll never check the "Wagon" includes. I've tested with my working engine file and errors in the "Wagon" includes do get caught, just later than you would imagine.
#14
Posted 26 August 2015 - 11:23 AM

I went ahead anyway and hit start. The locomotive did load and the game was ready to run. The only info in the log was "Found a suffix 'in2' which could not be parsed as a Distance unit" which I will track down and fix.
Let me know if you think the discrepancy between the menu and what actually happened is worthy of reporting as a bug.
:sign_thanks: for your help with the \ character.
#15
Posted 26 August 2015 - 11:32 AM
Genma Saotome, on 26 August 2015 - 11:23 AM, said:
That is interesting, although there are certainly differences in the precise nature of menu vs game loading (mostly down to the key point that the menu needs very little info compared to the game). I would file a bug anyway, especially because I get a load error too, so it should be easy for anyone to track down now.