Itoo Software Forum

RailClone => RailClone Lite => Topic started by: rohan256 on August 21, 2023, 01:20:50 PM

Title: Can't get gradated color probability to work.
Post by: rohan256 on August 21, 2023, 01:20:50 PM
Hi,

I'm using railclone pro 5.3.0. Am trying to follow this tutorial - https://www.itoosoft.com/tutorials/graduated-colour-probabilities?back=duration%3D10%26page%3D2%26tag%3Drailclone

but it is not working. Have attached a screenshot showing what I've used. Where have I gone wrong?
Title: Re: Can't get gradated color probability to work.
Post by: Michal KarmazĂ­n on August 21, 2023, 01:27:02 PM
Hi,

I'm sorry to hear you're facing these troubles. As mentioned in this "Parse error" tightly related post on our forum (https://forum.itoosoft.com/index.php?topic=4749.msg18437#msg18437): "There's a new Expressions syntax since the RailClone 3. Expressions now require you to add a return property before the expression and a semi-colon (;)at the end of the line."

It should look like the following:

return <theCorrespondingExpression>;

in this case:

return if(Input1<YSplinePosition, 1, 2);

I hope that helps.

Best regards,
Title: Re: Can't get gradated color probability to work.
Post by: rohan256 on August 21, 2023, 01:37:09 PM
Thank you very much. I knew I must have missed some simple point. Will keep this in mind when using expressions.