Hi all,

I’m struggeling with a code block. Today I’m realy starting on formula’s inside code blocks.

And I’ve already created me baseline formula’s to calculate some value’s.

However now I want to use the if and else statements but the code block just say’s “error” and is red.

This is what I have so far:

Code block 1:

l = 500

r = 8750

hoh = 150

Code block 2:

z = l * 0.5;

Verdeling = Math.Round((Math.Sqrt(Math.Pow(r,2) - Math.Pow(z,2))) / hoh);

Rest = (Math.Sqrt(Math.Pow(r,2) - Math.Pow(z,2))) - (Verdeling * hoh);

if (Rest + (hoh * 0.5) < hoh)

{

Ystart1 = hoh * 0.5;

};

else

{

Ystart1 = 0;

};

And before the If statement the node worked so it must be a notation error in the if and else statements.

Isn’t this the standard notation:

if (true) {do this};

else {do the other thing};

Can someone point out my error?