BVEStation

Author Topic: Can't see route in Route Viewer  (Read 8996 times)

Offline arremm1

  • New Recruit
  • *
  • Posts: 33
  • Gender: Male
  • BVEStation Member
    • View Profile
Can't see route in Route Viewer
« on: March 08, 2016, 05:44:50 pm »
I was trying my hand at coding a route in csv and I have the "with structure" all coded and I have put in the first 6 or 7 lines of coding for "with track", but when I try to open the route in Route Viewer, I just get a black screen with none of the options except "F7 - Open Route". I don't see anything.  Is there anything obvious to anyone that I may have overlooked?  I'd appreciate any help that I can get.  Thanks :(

Offline YankeesPwnMets

  • Head Admin
  • Dispatcher
  • ******
  • Posts: 683
  • Gender: Male
  • Lexington Av Express
    • View Profile
Re: Can't see route in Route Viewer
« Reply #1 on: March 08, 2016, 11:51:54 pm »
Hmm... mind if you post a snippet of your With Structure and With Track sections?

Code: [Select]
[code]Type your code between these two brackets when you post it[/code ]
« Last Edit: March 08, 2016, 11:54:07 pm by YankeesPwnMets »

Offline arremm1

  • New Recruit
  • *
  • Posts: 33
  • Gender: Male
  • BVEStation Member
    • View Profile
Re: Can't see route in Route Viewer
« Reply #2 on: March 09, 2016, 10:41:53 am »
I hope that I did this right.  Here is the file.  Thanks for your interest, YankeesPwnMets.  It would not let me post the csv file, but here is the plain text copy.  Hope this works.  No, it says that the file is too big!  Any way to work around this?

Offline arremm1

  • New Recruit
  • *
  • Posts: 33
  • Gender: Male
  • BVEStation Member
    • View Profile
Re: Can't see route in Route Viewer
« Reply #3 on: March 09, 2016, 10:56:17 am »
I'll try again.  Nope   Keep getting message "error has occurred.  Upload folder is full  Try a smaller file"

Offline arremm1

  • New Recruit
  • *
  • Posts: 33
  • Gender: Male
  • BVEStation Member
    • View Profile
Re: Can't see route in Route Viewer
« Reply #4 on: March 09, 2016, 12:26:08 pm »
Loaded the route into BVE (not Route Viewer) to see if I could generate an error log.  I got a short log with several errors (files not found) but got a critical error "The relative path contains invalid characters".  Can't even attach that file (very small).  Still get error "Upload folder full"   

Offline YankeesPwnMets

  • Head Admin
  • Dispatcher
  • ******
  • Posts: 683
  • Gender: Male
  • Lexington Av Express
    • View Profile
Re: Can't see route in Route Viewer
« Reply #5 on: March 09, 2016, 01:06:35 pm »
You should try simply copying and pasting the contents of the file, rather than uploading the entire file onto here

Offline arremm1

  • New Recruit
  • *
  • Posts: 33
  • Gender: Male
  • BVEStation Member
    • View Profile
Re: Can't see route in Route Viewer
« Reply #6 on: March 09, 2016, 01:57:44 pm »
It won't allow me to copy and paste.  Could you please explain how?

Offline YankeesPwnMets

  • Head Admin
  • Dispatcher
  • ******
  • Posts: 683
  • Gender: Male
  • Lexington Av Express
    • View Profile
Re: Can't see route in Route Viewer
« Reply #7 on: March 09, 2016, 03:51:14 pm »
You should copy the file into PasteBin or upload it onto a file sharing site like MediaFire and put the link.

I took a look at your file and went through the source code of openBVE.

Code: [Select]
private static readonly char[] InvalidPathChars = new char[] { ':', '*', '?', '"', '<', '>', '|' };
Code: [Select]
if (relative.IndexOfAny(InvalidPathChars) >= 0) {
throw new ArgumentException("The relative path contains invalid characters.");

Man, I haven't touched C# in years but at least I can still read it  ;D. This conditional basically said that if a CSV file contained any of the characters { ':', '*', '?', '"', '<', '>', '|' } outside of comments, it would throw the error "The relative path contains invalid characters." On line 219 of your file, you wrote
Code: [Select]
.rail(84) LisaRaye2\TJay rails\El156R3R.b3d                           :Left Outer TrackYou placed a colon ':' instead of a semicolon ';' in front of the comment, which was the reason why that error was thrown. In addition, on line 157, you wrote
Code: [Select]
.rail(22) Lexington|Pelham Bay\ElTieRusted3RR.b3d     ;EL Tie Beige with 3rd Rail RightWatch your syntax here. You typed in a '|' after Lexington instead of a '\'. The same goes for line 545:
Code: [Select]
.freeobj(382) Lexington|Pelham Bay\stawall18l.b3d
Try fixing these errors and reloading it into RouteViewer. Your With Track section is empty, so obviously no structure is going to load, but openBVE should at least be able to read the file properly now. It was also my understanding that you needed a comma after every statement in With Structure, ie.
Code: [Select]
.freeobj(0) foo\foo.b3d, and I noticed that you did not put commas after any of your with structure statements. If a more seasoned route developer could comment on this, it would be appreciated.
Also, one final thing, download Notepad++. It allows you to view line numbers and is basically Notepad on steroids. It's also far more flexible than Notepad++.

https://notepad-plus-plus.org/
« Last Edit: March 09, 2016, 04:07:57 pm by YankeesPwnMets »

Offline arremm1

  • New Recruit
  • *
  • Posts: 33
  • Gender: Male
  • BVEStation Member
    • View Profile
Re: Can't see route in Route Viewer
« Reply #8 on: March 09, 2016, 05:23:40 pm »
I'm sorry that I don't know your first name, but whatever it is, you are a genius.  I fixed the 3 syntax errors that you pointed out and my route now loads in Route Viewer.  I have about a million errors per Route Viewer, but I will take them one at a time.  Thank you so much for your help!  You were a great help!   Richie Macchietto

Offline YankeesPwnMets

  • Head Admin
  • Dispatcher
  • ******
  • Posts: 683
  • Gender: Male
  • Lexington Av Express
    • View Profile
Re: Can't see route in Route Viewer
« Reply #9 on: March 09, 2016, 06:26:24 pm »
Try adding commas to the end of every object you load in. If you notice, you don't have commas at the end of your lines while the other routes I looked at do. I have no idea if this makes an actual difference, but the name CSV (Comma-Separated Values) kind of implies that you should separate everything with a comma.


Offline HijauKuda

  • Conductor
  • **
  • Posts: 207
  • Gender: Male
  • BVEStation Member
    • View Profile
Re: Can't see route in Route Viewer
« Reply #10 on: March 10, 2016, 12:02:10 pm »
...you don't have commas at the end of your lines while the other routes I looked at do. I have no idea if this makes an actual difference...

Sir YankeesPwnMets
I do find commas at end of line are not of neccessary in the openBVE route or the object CSV.
Good day and night for you
Hijau