Itoo Software Forum

Author Topic: Can't get gradated color probability to work.  (Read 23765 times)

rohan256

  • Newbie
  • *
  • Posts: 5
Can't get gradated color probability to work.
« 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?

Michal Karmazín

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2772
Re: Can't get gradated color probability to work.
« Reply #1 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: "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,

rohan256

  • Newbie
  • *
  • Posts: 5
Re: Can't get gradated color probability to work.
« Reply #2 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.