Results 1 to 6 of 6

Thread: Cannot Parse Constant NAN

  1. #1

    Default Cannot Parse Constant NAN

    Clearly I've done something bad with track editing... I'm now finding these types of errors in my TDB, which are warnings in the ORTS log but aren't preventing the game engine or TSRE from running since these phantom vectors seem to be isolated....

    Code:
    		TrackNode ( 724
    			TrVectorNode (
    				TrVectorSections ( 1 1 23615 -11543 14423 192 2 3 00 -11543 14423 nan 175.59676 nan nan nan 0 )
    			)
    			TrPins ( 1 1
    				TrPin ( 725 1 )
    				TrPin ( 2715 1 )
    			)
    		)
    		TrackNode ( 725
    			TrEndNode ( 0 )
    			UiD ( -11543 14423 192 2 -11543 14423 nan 175.59676 nan nan nan 0 )
    			TrPins ( 1 0
    				TrPin ( 724 1 )
    			)
    		)
    
    		TrackNode ( 2715
    			TrEndNode ( 0 )
    			UiD ( -11543 14423 192 3 -11543 14423 nan nan nan nan nan 0 )
    			TrPins ( 1 0
    				TrPin ( 724 0 )
    			)
    		)
    		TrackNode ( 2711
    			TrVectorNode (
    				TrVectorSections ( 1 1 23615 -11543 14423 192 4 5 00 -11543 14423 nan 175.59676 nan nan nan 0 )
    			)
    			TrPins ( 1 1
    				TrPin ( 2714 1 )
    				TrPin ( 2717 1 )
    			)
    		)
    		TrackNode ( 2712
    			TrEndNode ( 0 )
    			UiD ( -11543 14423 192 0 -11543 14423 nan 175.59676 nan nan nan 0 )
    			TrPins ( 1 0
    				TrPin ( 2716 1 )
    			)
    		)
    		TrackNode ( 2714
    			TrEndNode ( 0 )
    			UiD ( -11543 14423 192 4 -11543 14423 nan 175.59676 nan nan nan 0 )
    			TrPins ( 1 0
    				TrPin ( 2711 1 )
    			)
    		)
    		TrackNode ( 2715
    			TrEndNode ( 0 )
    			UiD ( -11543 14423 192 3 -11543 14423 nan nan nan nan nan 0 )
    			TrPins ( 1 0
    				TrPin ( 724 0 )
    			)
    		)
    		TrackNode ( 2716
    			TrVectorNode (
    				TrVectorSections ( 1 1 23615 -11543 14423 192 0 1 00 -11543 14423 nan 175.59676 nan nan nan 0 )
    			)
    			TrPins ( 1 1
    				TrPin ( 2712 1 )
    				TrPin ( 1970 1 )
    			)
    		)
    		TrackNode ( 2717
    			TrEndNode ( 0 )
    			UiD ( -11543 14423 192 5 -11543 14423 nan nan nan nan nan 0 )
    			TrPins ( 1 0
    				TrPin ( 2711 0 )
    			)
    		)
    It references UiD 192 and a sr_3tstr_y_050m.s track item in that particular W file, which doesn't exist... Curious if anyone else has run into this and knows of a hack to resolve it within the TDB.
    Last edited by eolesen; 12-19-2020 at 10:38 AM.

  2. #2
    Join Date
    Oct 2015
    Location
    Poland
    Posts
    646

    Default

    Just remove these items from file and run tsre and save.

  3. #3

    Default

    and knows of a hack to resolve it within the TDB.
    Make a copy of the tdb.
    Delete all faulty TrackNode manually in the .tdb.
    Open the Route in TSRE, select ROUTE SAVE.
    TSRE restores the numbering.
    Exit TSRE and start the route in OR, check the ORTS log again.

    Oh sorry - i am to late...

  4. #4

    Default

    Hmmm.... I tried did that approach, and it looks like things got worse. A whole bunch of unrelated track shapefiles disappeared from my route...


    Decided to go old old old old school... correct the bad values with something I knew should be good.

    1) Laid a piece with the same geometry (new UID 208) and saved/closed TSRE
    2) Opened the W file in Notepad and copied the entry for UiD 208
    3) Renumbered the duplicate TrackObject to UiD 192
    4) Saved and closed the W file

    5) Opened up the TDB in Notepad and copied all the "-11543 14423 208" TDB entries
    6) Pasted those into a blank Notepad file
    7) Changed the all of the "-11543 14423 208" to "-11543 14423 192"
    8) Adjusted all of the X positions values in those lines by -20
    9) Located the bad TDB lines for "-11543 14423 192" and replaced the TrEndNode UID and TrVectorNode TrVectorSection entries with the modofied entries in that blank Notepad file
    10) Saved and closed the TDB
    11) opened up TSRE, found both sections, selected and deleted both 208 and 192....

    It's been probably five years since I had to directly edit a TDB, but it came back to me about halfway thru....

  5. #5
    Join Date
    Oct 2008
    Location
    Lubec ME USA
    Posts
    426

    Default

    I wish the format of the TDB was documented somewhere. I suppose one could go through the ORTS code to figure it out but that would be tedious. It would make things like the above post easier to do..

    Jon

  6. #6

    Default

    Quote Originally Posted by jonpd View Post
    I wish the format of the TDB was documented somewhere. I suppose one could go through the ORTS code to figure it out but that would be tedious. It would make things like the above post easier to do..

    Jon
    https://www.trainsim.com/vbts/showth...de-of-tdb-file

    That should be insightful enough.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
-->