Many of the activities that came with this route do not function correctly in OR. Looking at the logs, there are warnings concerning four of the semaphore signals. Here is what that segment of the log looks like (for one of the errant signals):
Warning: sigscr-file line 341 : Unknown function call : EXTERN FLOAT NEXT_SIG_LR (
Details : System.ArgumentException: Requested value 'EXTERN FLOAT NEXT_SIG_LR' was not found.
at System.Enum.Parse(Type enumType, String value, Boolean ignoreCase)
at Orts.Formats.Msts.SignalScripts.SCRScripts.process _FunctionCall(String FunctionStatement, IDictionary`2 LocalFloats, Int32 linenumber) in e:\Documents\Coding\Jenkins\jobs\Open Rails Unstable\workspace\Source\Orts.Formats.Msts\Signal Scripts.cs:line 1544
Warning: sigscr-file line 343 : Unknown parameter in statement : FLOAT HAS_FIXED_RED1
Warning: sigscr-file line 344 : Unknown parameter in statement : FLOAT HAS_FIXED_RED2
Warning: sigscr-file line 345 : Unknown parameter in statement : FLOAT HAS_FIXED_RED3
The other three entries are similar.
Now, here is the relevant portion of the sigscr.dat file:
//////////////////////////////////////////////////////////////////////////////////////
SCRIPT LQHome
// US Lower Quadrant Semephore (Home)
extern float block_state ();
extern float route_set ();
extern float def_draw_state ();
extern float state;
extern float draw_state;
extern float sig_feature () ;
extern float enabled;
float next_state;
extern float next_sig_lr ();
float has_fixed_red1;
float has_fixed_red2;
float has_fixed_red3;
has_fixed_red1 = sig_feature (SIGFEAT_USER1);
has_fixed_red2 = sig_feature (SIGFEAT_USER2);
has_fixed_red3 = sig_feature (SIGFEAT_USER3);
/*This script attempts to work around the fact that semaphores will not accept the ABS flag*/
if (enabled){
if (!enabled ||
block_state() !=# BLOCK_CLEAR ||
!route_set() )
{
state = SIGASP_STOP;
}
else
{
state = SIGASP_CLEAR_2;
}
}
else{
if (block_state() !=# BLOCK_CLEAR )
state = SIGASP_STOP;
else
state = SIGASP_CLEAR_2;
}
// Get draw state
draw_state = def_draw_state (state);
//////////////////////////////////////////////////////////////////////////////////////
If there is anyone out there who is conversant in the inner-workings of the sigscr file, please, help us out with what is wrong with this script.
Thank you.
Warning: sigscr-file line 341 : Unknown function call : EXTERN FLOAT NEXT_SIG_LR (
Details : System.ArgumentException: Requested value 'EXTERN FLOAT NEXT_SIG_LR' was not found.
at System.Enum.Parse(Type enumType, String value, Boolean ignoreCase)
at Orts.Formats.Msts.SignalScripts.SCRScripts.process _FunctionCall(String FunctionStatement, IDictionary`2 LocalFloats, Int32 linenumber) in e:\Documents\Coding\Jenkins\jobs\Open Rails Unstable\workspace\Source\Orts.Formats.Msts\Signal Scripts.cs:line 1544
Warning: sigscr-file line 343 : Unknown parameter in statement : FLOAT HAS_FIXED_RED1
Warning: sigscr-file line 344 : Unknown parameter in statement : FLOAT HAS_FIXED_RED2
Warning: sigscr-file line 345 : Unknown parameter in statement : FLOAT HAS_FIXED_RED3
The other three entries are similar.
Now, here is the relevant portion of the sigscr.dat file:
//////////////////////////////////////////////////////////////////////////////////////
SCRIPT LQHome
// US Lower Quadrant Semephore (Home)
extern float block_state ();
extern float route_set ();
extern float def_draw_state ();
extern float state;
extern float draw_state;
extern float sig_feature () ;
extern float enabled;
float next_state;
extern float next_sig_lr ();
float has_fixed_red1;
float has_fixed_red2;
float has_fixed_red3;
has_fixed_red1 = sig_feature (SIGFEAT_USER1);
has_fixed_red2 = sig_feature (SIGFEAT_USER2);
has_fixed_red3 = sig_feature (SIGFEAT_USER3);
/*This script attempts to work around the fact that semaphores will not accept the ABS flag*/
if (enabled){
if (!enabled ||
block_state() !=# BLOCK_CLEAR ||
!route_set() )
{
state = SIGASP_STOP;
}
else
{
state = SIGASP_CLEAR_2;
}
}
else{
if (block_state() !=# BLOCK_CLEAR )
state = SIGASP_STOP;
else
state = SIGASP_CLEAR_2;
}
// Get draw state
draw_state = def_draw_state (state);
//////////////////////////////////////////////////////////////////////////////////////
If there is anyone out there who is conversant in the inner-workings of the sigscr file, please, help us out with what is wrong with this script.
Thank you.





Comment