Elvas Tower: Signal issue with Monogame - Elvas Tower

Jump to content

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

Signal issue with Monogame Rate Topic: -----

#1 User is offline   railguy 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 651
  • Joined: 10-October 10
  • Gender:Male
  • Location:Kansas
  • Simulator:Open Rails
  • Country:

Posted 07 October 2019 - 10:27 AM

Recently, I was working on creating an activity for Marias Pass 5. I ran into an issue that I believe that others have experienced, but I wanted to show it here. I'm running U2019.09.16-0636 Rev. 33 (debug). As others have reported on some other routes, signals in the Dispatch window display correctly, but signals in-game stay red. I believe this is an issue in either/and the sigscr or sigcfg files for the route. I've attached the salient portion of log file for my latest run showing the issue. Any assistance would be appreciated. Unfortunately, the system will not allow me to attach the sigscr or sigcfg file. Thank you.

Attached File(s)



#2 User is offline   ebnertra000 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,234
  • Joined: 27-February 17
  • Gender:Male
  • Location:East-Central Minnesota
  • Simulator:OR/TSRE
  • Country:

Posted 07 October 2019 - 11:01 AM

I think I have that route, so I can take a look when I get home. If I recall, that route uses the (rubbish) default signal system that came with Marias Pass back in 2001. You say this is a portion of the log? Does anything else in the log point to signals?

#3 User is offline   railguy 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 651
  • Joined: 10-October 10
  • Gender:Male
  • Location:Kansas
  • Simulator:Open Rails
  • Country:

Posted 07 October 2019 - 12:42 PM

No, I did not see anything. Lots of sound errors, etc., but nothing else signal related that I could see. Also, as I ran the activity, an AI train had a green signal in the Dispatch Viewer and had a red in the sim. The AI followed the Dispatch Viewer signal and proceeded, as it should have. That tells me that the signal issue is a display problem in the sim, not an incorrect signal in the signal logic. I also believe that the signals display red even in explore mode when there is (obviously) no other paths or AI traffic.

#4 User is offline   perpetualKid 

  • Fireman
  • Group: Status: Active Member
  • Posts: 190
  • Joined: 10-June 18
  • Gender:Male
  • Simulator:OR
  • Country:

Posted 07 October 2019 - 05:37 PM

View Postrailguy, on 07 October 2019 - 10:27 AM, said:

Recently, I was working on creating an activity for Marias Pass 5. I ran into an issue that I believe that others have experienced, but I wanted to show it here. I'm running U2019.09.16-0636 Rev. 33 (debug). As others have reported on some other routes, signals in the Dispatch window display correctly, but signals in-game stay red. I believe this is an issue in either/and the sigscr or sigcfg files for the route. I've attached the salient portion of log file for my latest run showing the issue. Any assistance would be appreciated. Unfortunately, the system will not allow me to attach the sigscr or sigcfg file. Thank you.

you can zip the sigscr/sigcfg to attach them here. According to the error log looks like something odd in the signal script, there are more closing brackets than opening ones before or in line 166


#5 User is offline   railguy 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 651
  • Joined: 10-October 10
  • Gender:Male
  • Location:Kansas
  • Simulator:Open Rails
  • Country:

Posted 07 October 2019 - 06:26 PM

Zip file attached.

Attached File(s)



#6 User is offline   perpetualKid 

  • Fireman
  • Group: Status: Active Member
  • Posts: 190
  • Joined: 10-June 18
  • Gender:Male
  • Simulator:OR
  • Country:

Posted 08 October 2019 - 01:33 AM

turns out there is a bug in the signalscriptparser which the Monogame versions are using, I'll provide a fix which Carlo needs to include in his next version.

However there is some other issue in the script which is debatable how to adress:

This script nests functional calls as parameters
debug_out (block_state()); 
which is not supported and the new scriptparser will purposefully raise an exception.

debug_out() and debug_header() are not implemented in OR yet not causing any harm if found in the scripts normally. But in combination with the nested calls this will not work and I think there is no intend to fix/change this.

So if you want to get your script running in the meanwhile, I'd suggest you to change the script

- remove all comment lines which are using /* and */ as delimiter, or put another / in front of each line so it starts as //*. As said, this will be fixed but youæll have to wait until a new release get published

AND
- change the nested function calls
debug_out (block_state()); 

into something like
float blockstate:
blockstate = block_state();
debug_out(blockstate);

This would allow to still have debug output in other trainsims, but put OR in a valid state.
- or simply remove or comment out ( // in the start of the line ) the debug_out statements, at least the ones with nested calls, since they will be of no use in OR anyway.

#7 User is offline   railguy 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 651
  • Joined: 10-October 10
  • Gender:Male
  • Location:Kansas
  • Simulator:Open Rails
  • Country:

Posted 08 October 2019 - 05:34 AM

Thank you for looking into the script. I'll give your suggestions a try and see what happens. I have to wonder how many other routes out there use similar scripts that would cause problems.

#8 User is offline   ebnertra000 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,234
  • Joined: 27-February 17
  • Gender:Male
  • Location:East-Central Minnesota
  • Simulator:OR/TSRE
  • Country:

Posted 08 October 2019 - 06:25 AM

Most likely a lot of routes have this, since a lot of route builders used the default signals, either because they needed a similar system, or they didn't care that those signals are just plain bad

#9 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,986
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 08 October 2019 - 08:16 AM

That's not sure. The Marias Pass sigscr.dat hasn't such constructs (nested call within debug_out).

#10 User is offline   railguy 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 651
  • Joined: 10-October 10
  • Gender:Male
  • Location:Kansas
  • Simulator:Open Rails
  • Country:

Posted 08 October 2019 - 05:33 PM

I tried your suggestion of "commenting out" the debug_out statements. It pretty much destroyed the signal logic and really didn't fix the signal incorrect display issue. Since I am no expert at signal scripting, I'm probably going to abandon trying to write an activity for Marias 5 for the moment. I did upgrade to Release 34 of Monogame, but that didn't help. Thanks to all that have tried to help.

  • 2 Pages +
  • 1
  • 2
  • 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