Itoo Software Forum

Author Topic: Arithmetic parse error  (Read 165 times)

Macker

  • Full Member
  • ***
  • Posts: 120
Arithmetic parse error
« on: November 13, 2019, 05:56:08 PM »
Hi guys, just following your video tutorial for building parametric windows, and I can't get the arithmetic node expression to work at all. I get the following error:

Parse error. Expected ')' or ',' in argument list at line 1:
if(YSplinePosition=0,3,

I've also tried copying and pasting from the text version of the tutorial with the same issue.

Dragan

  • Sr. Member
  • ****
  • Posts: 355
Re: Arithmetic parse error
« Reply #1 on: November 13, 2019, 06:01:13 PM »
Hi
You are missing one parameter and you have to use `==`
Also you have to start with word Return folowing expression ...
Return
if(YSplinePosition==0,3,_);

https://docs.itoosoft.com/railclone/converting-railclone-2-styles-for-railclone-3
« Last Edit: November 13, 2019, 08:43:28 PM by Dragan »

Macker

  • Full Member
  • ***
  • Posts: 120
Re: Arithmetic parse error
« Reply #2 on: November 14, 2019, 11:05:03 AM »
Thank you :)

Macker

  • Full Member
  • ***
  • Posts: 120
Re: Arithmetic parse error
« Reply #3 on: November 14, 2019, 11:13:40 AM »
Hm,

Managed to get rid of the parse error now by adding a parameter that is missing; but it still doesn't work. I'm following this directly from the railclone tutorial here https://www.itoosoft.com/tutorials/parameterise-windows?back=page%3D5%26tag%3Drailclone

Macker

  • Full Member
  • ***
  • Posts: 120
Re: Arithmetic parse error
« Reply #4 on: November 14, 2019, 12:16:03 PM »
Here's where I'm at with it

Rokas

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2003
    • iToo
Re: Arithmetic parse error
« Reply #5 on: November 25, 2019, 09:45:37 AM »
Hi Macker

Tutorial was created for RailClone v2. Expressions were greatly improved in RailClone v3.

The same expression in v3 is written like this:

Code: [Select]
return if(YSplinePosition==0,3,
if(YSplinePosition==1,1,
2));
Rokas
iToo Software