Elvas Tower: Include problem - Elvas Tower

Jump to content

  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

Include problem Rate Topic: -----

#11 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,355
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 11 July 2014 - 12:09 PM

 JohnnyS, on 11 July 2014 - 10:59 AM, said:

You have a space between the mass figure and the 't', that maybe causing the problem.


Reasonable thought... but no... I took out the space and the car is still 10t.


I moved the lines from the .inc back into the .wag file... still says 10t, which is why I'm wondering if there is some issue about where in the file the line is found.

#12 User is offline   markus_GE 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 4,862
  • Joined: 07-February 13
  • Gender:Male
  • Location:Leoben, Styria, Austria, Europe
  • Simulator:ORTS / MSTS
  • Country:

Posted 11 July 2014 - 12:27 PM

In the WAG files I usually deal with when installing new stuff, I always find the Mass() line quite close to the beginning of the file. Maybe 5 lines after the Wagon( statement. Files set up that way work without problems here.

Cheers, Markus

#13 User is offline   Lindsayts 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,849
  • Joined: 25-November 11
  • Gender:Male
  • Country:

Posted 11 July 2014 - 12:55 PM

A couple of points....

The main parsing code does not come into play until after the include code assembles the final result so one can get an interplay here. This example though looks to be OK.

From my experience if a value description (feet,inches,meters) is incorrect the program will throw an error something like value not known.

I have found the error checking in the parser is fairly basic and getting strange error messages is what one may say normal.
It may be worth looking at the file with a hex editor to see if one has a none printing character in there thats throwing off the parser.

This has already been mentioned but it did cross my mind that may be one of the key words is missing a parameter.

A final point I cannot at this stage remember the error but the include codes __does__ do some parsing. From memory (I think) one of these is it requires "name" to be in the "Wagon" section of an eng file.

Lindsay

#14 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,355
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 11 July 2014 - 03:06 PM

Reviewing the Include() code I found comments there about proper usage... that Include() works when the string is located at a "root block" level (i.e., an element of Wagon() and not an element of something like Spring()). AFAIK, I've made sure to follow that rule.

I'll check the parameter lists again... but for the most part the .inc was construction by doing cut and paste form a working .wag... with the only edits replacing leading spaces with a tab.

#15 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,355
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 11 July 2014 - 07:14 PM

It is something about where in the .wag things appear.

This fails to find mass() -- it is in the include file found on line 11
Attached Image: e10.jpg


But when the include file is moved to line 6 the correct value for Mass() is obtained.
Attached Image: e11.jpg


That strikes me as buggy and leaves me wondering what other not documented positional rules there might be.

#16 User is offline   markus_GE 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 4,862
  • Joined: 07-February 13
  • Gender:Male
  • Location:Leoben, Styria, Austria, Europe
  • Simulator:ORTS / MSTS
  • Country:

Posted 12 July 2014 - 12:31 PM

This is just what I imagine - no hard data to prove it.

It would be logical to have Mass() before anything that might, in some way, depend on it, which would be brakes and friction (obviously, but they are after the Inc containing mass in both of your examples), but maybe also coupling gear (which is before the Mass file in your first example). Reason I can imagine would be to determine some kind of force when the gear is to break or whatever along these lines...

Cheers, Markus

#17 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,355
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 12 July 2014 - 06:00 PM

OR fails to find the correct value for Mass() in this .wag as well.

Wagon ( xm_atsf_142331_mt

	Include ( XM_ATSF_142331_Mesh_Dimensions.inc )
	Include ( "..//fleet_stds/Std_Type_Coupler_Generic_Draft_Gear.inc" )

	Adheasion ( 0.2 0.4 2 0 )

	Mass ( 21.45t )
	DerailRailHeight ( 5cm )	
	DerailRailForce (  48.6486t )	
	DerailBufferForce ( 373.7216kn )	
	MaxBrakeForce( 7.095kN )
	MaxHandbrakeForce( 8.6kN	 )
	Friction (
		820N/m/s   -0.260   5.690mph  5.10N/m/s  1.59
		5.1N/rad/s  1   -1rad/s   0   1
	 )

	Include ( "..//fleet_stds/Single_Pipe_AB_Brakes_80_PSI.inc" )

	Sound ( "genfreightwag1.sms" )
	Name ("XM 40' ATSF 142331 MT")
)


#18 User is offline   markus_GE 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 4,862
  • Joined: 07-February 13
  • Gender:Male
  • Location:Leoben, Styria, Austria, Europe
  • Simulator:ORTS / MSTS
  • Country:

Posted 13 July 2014 - 03:46 AM

What if you move Mass() before Adhesion() / the coupler gear include?

Cheers, Markus

#19 User is offline   Serana 

  • Conductor
  • Group: Status: Contributing Member
  • Posts: 489
  • Joined: 21-February 13
  • Gender:Male
  • Location:St Cyr l'Ecole (France)
  • Simulator:Open Rails
  • Country:

Posted 13 July 2014 - 04:09 AM

For your information, there's also a problem with the Include command : if you don't put a new line at the end of the include file, the parser will skip everything after the Include command until the current block is finished.

#20 User is offline   Genma Saotome 

  • Owner Emeritus and Admin
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 15,355
  • Joined: 11-January 04
  • Gender:Male
  • Location:United States
  • Simulator:Open Rails
  • Country:

Posted 13 July 2014 - 07:43 AM

 Serana, on 13 July 2014 - 04:09 AM, said:

For your information, there's also a problem with the Include command : if you don't put a new line at the end of the include file, the parser will skip everything after the Include command until the current block is finished.


That's not good. Not good at all.

  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users