How does con editor handle unknown parameters?
#1
Posted 15 July 2018 - 01:00 PM
I'm doing some work for to-be-proposed parameters and have noticed that the con editor appears to stop reading the remaining data of a .wag file when it encounters one of these.
Could you check? I think all you have to do is insert a bogus parameter name in the middle of any .wag file -- BogusName( 123 ) would serve well enough -- and see whether I'm correct.
This could be a larger problem if anyone misspells a real parameter name. Trapping with error message would be much better than abruptly stopping.
Lemme know.
Thanks.
#2
Posted 15 July 2018 - 01:22 PM
Genma Saotome, on 15 July 2018 - 01:00 PM, said:
I'm doing some work for to-be-proposed parameters and have noticed that the con editor appears to stop reading the remaining data of a .wag file when it encounters one of these.
Could you check? I think all you have to do is insert a bogus parameter name in the middle of any .wag file -- BogusName( 123 ) would serve well enough -- and see whether I'm correct.
This could be a larger problem if anyone misspells a real parameter name. Trapping with error message would be much better than abruptly stopping.
Lemme know.
Thanks.
#3
Posted 15 July 2018 - 01:41 PM
But... you never really know what's going on w/o asking.
I have my suspicions OR is having the same problem but I've not yet invested the time to do any controlled testing.
#4
Posted 15 July 2018 - 05:49 PM
You are correct because I just solved an issue where the entire wagon would not show up on the list because "CommentToken" was used. I do not know if you have ever seen this, but about 3 lines worth was enough to stop the editor from reading to the end.
#5
Posted 15 July 2018 - 11:58 PM
Quote
In 99.99% cases this is caused by one bracket too much inside .INC file.
Quote
TSRE will ignore all undefined parameters if they are defined correctly.
Quote
This is different case. CommentToken crashed TSRE not because TSRE doesn't handle "CommentToken" Tag, but because CommentToken in your file is defined without ( ) and TSRE doesn't allow this kind of tag.
#6
Posted 16 July 2018 - 01:38 PM
Goku, on 15 July 2018 - 11:58 PM, said:
Not in this case. Here is the .wag:
SIMISA@@@@@@@@@@JINX0D0t______
Wagon ( XM_MILW_702584_Hides
Include ( "..\\Common.Inc\\Models\\Tim_Muir\\USRA_SS_Boxcar\\XM_USRA_SS_Empty_Car.inc" )
FreightAnim ( Old_ss_parts.s 1 1 1 )
Include ( "..\\Common.Inc\\Models\\Tim_Muir\\USRA_SS_Boxcar\\XM_USRA_SS_Hides_Ld.inc" )
Include ( "..\\Common.Inc\\Fleet\\Std_Type_E_Coupler_Generic_Draft_Gear.inc" )
Include ( "..\\Common.Inc\\Fleet\\Single_Pipe_AB_Brakes.inc" )
Sound ( "genfreightwag2.sms" )
Name ( "XM 40' MILW <USRA SS> 702584 Hides" )
)
The first .inc file:
Comment ( XM_USRA_SS_Empty_Car.inc )
comment ( "Parts 1A and 1B are correct for all .wags of this model" )
comment ( "Part 1A - Parameters based on the model itself." )
Size ( 3.1m 4.6m 13.45m )
WheelRadius ( 33in/2)
NumWheels ( 8 )
InertiaTensor ( Box ( 3.1m 4.6m 13.15m ) )
MaxBrakeForce (3.6497kn )
MaxHandbrakeForce (2.7372kn )
DerailRailHeight ( 4cm )
ORTSTrackGauge ( 4ft 8.5in )
ORTSRigidWheelBase (5ft 6in )
ORTSBearingType ( Friction )
ORTSUnbalancedSuperelevation ( 6in )
comment ( "Part 1B - Unsupported parameters based on the model itself." )
MaxHeight ( 13.5833 ft )
BrakeShoeFriction ( 0.2)
TargetPctMtyWeight ( 0.7)
DavisFormula ( "Davis 1926" )
CAPY ( 100000 )
LD_LMT ( 122400 )
LT_WT ( 46200 )
The second .inc file:
Comment ( XM_USRA_SS_Burlap_Bags_LD.inc )
comment ( "Part 2A and 2B are parameters based on presence or absence of a load. " )
comment ( "Parameters for an empty car belong in a Fixed_Specs.inc" file." )
comment ( "Parameters for a loaded car belong in a {Lading Name}_Loads.inc file." )
comment "Part 2A - parameters based on presence or absence of a load.
CentreOfGravity (1.9m)
DerailRailForce ( 109.0903t )
DerailBufferForce ( 380.1582kn )
ORTSDavis_A ( 178.5297 lbf )
ORTSDavis_B ( 2.1645 lbf/mph )
ORTSDavis_C ( 0.0685 lbf/mph^2 )
comment ( "Part 2B - Unsupported parameters based on presence or absence of a load." )
LadingWeight ( 24.45 s-t )
The third .inc file
comment ( "Type E coupler w/ generic draft gear" )
comment ( "For cars equipped with uncushioned slack pro-couplers ie: Hopper cars, gondolas, tankcars" )
comment ( "older flatcars and boxcars." )
Type ( Automatic )
Spring (
Stiffness ( 0 5e6N/m )
Damping ( 2e6N/m/s 2e6N/m/s )
Break ( 1023.09097kN 1023.09097kN )
r0 ( 7.68cm 15.24cm )
)
Velocity ( 0.2m/s )
)
Coupling (
Type ( Automatic )
Spring (
Stiffness ( 0 5e6N/m )
Damping ( 2e6N/m/s 2e6N/m/s )
Break ( 1023.09097kN 1023.09097kN )
r0 ( 7.68cm 15.24cm )
)
Velocity ( -0.2m/s )
)
Buffers (
Spring (
Stiffness ( 5e6N/m 8e6N/m )
Damping ( 1e6N/m/s 1e6N/m/s )
r0 ( 0m 1e9 )
)
Centre ( 0.5 )
Radius ( 1 )
Angle ( 0.5deg )
)
and the fourth:
Comment ( "Single_Pipe_AB_Brakes.inc" )
BrakeSystemType ( "Air_single_pipe" )
NumberOfHandbrakeLeverSteps( 100 )
TripleValveRatio( 2.5 )
MaxReleaseRate( 20 )
MaxApplicationRate( 0.9 )
MaxAuxilaryChargingRate( 1.684 )
EmergencyResCapacity( 2.604 )
EmergencyResChargingRate( 1.684 )
EmergencyBrakeResMaxPressure( 90 )
BrakeCylinderPressureForMaxBrakeBrakeForce( 70 )
The con editor display shows garbage for Mass(), nothing at all for brakes and couplers, and the "Wagon (" string for name. I had my editor count the ( and ) characters in each file before doing the copy paste here and there were matches all around. SOMETHING is going wrong in the first or second .inc file and I can't find it. It might be one of those very simple things that paradoxically are hard to see... or something new, I dunno.
What I do know is the information the con editor is displaying is wrong and I'd like to know how to correct it.
#7
Posted 16 July 2018 - 01:57 PM
Quote
Ok. This is also the case of no brackets after Tag Name.
Quote
Mass ( 48.0998 s-t )
The line is wrong everywhere! You can't put junk into the file and expect that software will think about everything.
Replace
comment "Part 2A - parameters based on presence or absence of a load.
With:
comment ( "Part 2A - parameters based on presence or absence of a load." )
#8
Posted 16 July 2018 - 02:05 PM
#9
Posted 16 July 2018 - 02:16 PM
#10
Posted 16 July 2018 - 02:31 PM
comment "Part 2A - parameters based on presence or absence of a load.
to:
comment ("Part 2A - parameters based on presence or absence of a load.")