Hi. This is old tutorial for previous RC.
Now you need to start with "Return" and end with ";" to send the results. Also, use double "==" for if statement.
Return
if(YSplinePosition == 0,3,
if(YSplinePosition == 1,1,2));
https://docs.itoosoft.com/railclone/style-editor/operators?_gl=1RailClone 3 included a new expressions engine. Be aware that there are a couple of key changes to remember.
The new version uses a double == for conditional tests
The way you write numbers is now important, for example in RailClone 3:
1 = an integer
1.0 = a float
This means that in RailClone 3 the expressions:
return 1/2;
Will result in 0, because both values are integers.
To return a float value you would use:
Return 1.0/2.0;
To send a value to the arithmetic node's output you must add a return command, for example:
return degToRad(90);