Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: REF FILE LINE NUMBERS

  1. #1
    Join Date
    Nov 1999
    Location
    .
    Posts
    446

    Default REF FILE LINE NUMBERS

    Well, here's a new one on me.

    I'm working on a relatively new route. It was working fine up until today.

    Today I went into the REF file and got a message telling me that I had an error in line number XXXX.
    Can anyone tell me how to goto a specific line number?

    I opened the ref file and worked my way down carefully. I found nothing. Everything looked normal.

    I hope someone can help on this problem.

    Joe Fortier alias Simerjoe

  2. #2
    Join Date
    Aug 2005
    Location
    Lexington, KY
    Posts
    1,793

    Default RE: REF FILE LINE NUMBERS

    How new is the route? A ref file with 9300 lines doesn't sound too new.

    What that tells me, is that you should look at the end of the file. I would inspect the last few entries with a magnifying glass.

    Basically, start at the bottom, and work your way up. Especially look at any new entries.

    James

  3. #3
    Join Date
    Apr 2003
    Location
    PHILADELPHIA, PA
    Posts
    2,792

    Default RE: REF FILE LINE NUMBERS

    Joe:
    You most likely have a missing or misplaced bracket. As James said, check your latest entries for a missing closing bracket.

    At the Steam4Me site you can download ConText, or jEdit from jEdit.org. Both text editors are free and display line numbers.

    IIRC if you are using XP you may be able to turn line numbers on using the View tab.

    John

    "BNSFLADY"
    CYNDI RICHARDS
    You will always
    be here with us.

  4. #4
    Join Date
    Nov 1999
    Location
    .
    Posts
    446

    Default RE: REF FILE LINE NUMBERS

    John!

    I downloaded Jedit and loaded my Ref file into it. I turned line numbers on.

    When I try to edit my route ref file, a message comes up telling me there's an error in line #9368.

    Well when I ran down each line of the ref file using Jedit, the last line is 8578. That's pretty weird isn't it?

    I do have a backup of the route. Maybe if I use the ref file in the backup of the route, everything will get back to normal.

    Thanks for help in trying to solve this bug. At least now I know how to put line numbers.

    Thanks. Joe Fortier alias simerjoe

  5. #5
    Join Date
    Nov 1999
    Location
    .
    Posts
    446

    Default RE: REF FILE LINE NUMBERS



    How can ones route be almost new and contain such a large Ref file?

    I created a folder containing all the folders and files from a collection of all the large routes that I've downloaded. They contain shapes, sound, terttex, textures, carspawn, forests, ssource, ttype and finally the REF file. The folder is 539 MB. When I create a new route, I throw all the files in this folder in the new route. I'll tell you it is very simple to create the bones and body of a new route before even laying on pc of track or anything else for that matter.

    Joe Fortier alias simerjoe

  6. #6
    Join Date
    Apr 2003
    Location
    PHILADELPHIA, PA
    Posts
    2,792

    Default RE: REF FILE LINE NUMBERS

    Joe:
    I had this problem before where the line number was greater than the number of lines in the file. I traced it to a recent entry that I had placed near the top of the ref file. Using jEdit bracket check found I omitted a closing bracket.

    John

    "BNSFLADY"
    CYNDI RICHARDS
    You will always
    be here with us.

  7. #7
    Join Date
    Apr 2003
    Location
    PHILADELPHIA, PA
    Posts
    2,792

    Default RE: REF FILE LINE NUMBERS

    Hit the button twice, deleted

    John

    "BNSFLADY"
    CYNDI RICHARDS
    You will always
    be here with us.

  8. #8
    Join Date
    Nov 1999
    Location
    Bootheel, MO, USA
    Posts
    2,068

    Default RE: REF FILE LINE NUMBERS

    Joe, had this higher number than lines in ref file show up and finally traced it to a bad line about half way through the car-spawner dat, that when added to the ref file, actually pointed to the correct line.

    I did some experimentation and finally figured out the .dat files seemed to be concantenated to the ref file and then read as consecutive line numbers. Took me a long time to figure that one out though.

    In fact, probably wouldn't have found it had I not made a note of changing that line the day before.

    RobertR
    ADF-M&RM
    Cascade & North Western at http://www.vcnwrr.com/

  9. #9
    Join Date
    Sep 2002
    Location
    Zuerich, ZH, Switzerland.
    Posts
    4,018

    Default RE: REF FILE LINE NUMBERS

    Hi Joe,

    > When I try to edit my route ref file, a message comes up telling me there's an error in line #9368.
    > Well when I ran down each line of the ref file using Jedit, the last line is 8578. That's pretty weird isn't it?

    That pretty much indicates that you miss a closing ' ) ' bracket or ' " ' hyphen in a line, messing up the sim's logic as to where a ref file entry for a particular item starts or ends, or even as to where the ref file per se ends.

    If you exactly remember what you added recently to the ref file, do a visual check on all these addition. Should be easy if you added things at the end, but if you copied something halfway in the file to make a repainted clone of an already exising item (e.g. a USYellowHouse.s cloned from USTanHouse.s), then it could be a bit more tricky. But if you failed to spot the error within reasonable time, then - rather than spending the time of examining any line manually or with a context editor - I recommend moving the corrupt .ref file to a temporary location and re-installing the last healthy back-up of the .ref file. Once you're back at that point, carefully add those new items again with one of which you imported the error. Add one new item at a time, and load the route in RE after each addition and save of the .ref file. Once the error message re-appears, you have identified the corrupt entry.

    Now check the .ref file entry for that item: Look for missing brackets, missing hyphens, typos in the terminology etc. You wouldn't believe what types of manifest errors can hide in scenery add-ons and in their "add-to-ref.txt" files before you have seen it with your own proper eyes. For example:

    Staitc ( -> Error: Typo Staitc instead of Static
    Class ( "Überführungen Type #2" ) -> Error: Non-ASCII foreign language / other non-alphanumerical characters
    FileName ( WhateverShape ) -> Error: Missing .s in file name
    Align ( "None ) -> Error: Missing closing "
    Name ( Whatever Shape it is ) -> Error: Terms with blanks always must be in hyphens "Whatever Shape it is"

    Static ( -> Error: No closing bracket separating new entry from previous entry

    Believe me: I have seen and fixed all these types of errors with one or the other scenery item I added to the .ref file, including the typo 'Staitc'. Although they won't come in such a pile-up as in the example above, any one of them can cause you quite a head-ache.

    Lukas a.k.a Swissie

  10. #10
    Join Date
    Jun 2006
    Location
    .
    Posts
    2,003

    Default RE: REF FILE LINE NUMBERS

    You can also use 'Find' and 'Go To' in your Notepad/Edit menu and merely type 'line xxx' I believe. I did this once or twice, as I think Route Riter duplicated some items during 'delete duplicates' (ie; car spawner for one!) In my haste to remove them manually, I may have deleted a bracket or something. Find and Go To simplified the needle in the haystack for me. ;)

Posting Permissions

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