How was that done again?
I think there was a way to have the game check if the result of two variable was within a certain range.
was it
*if ((x + y /2) >= z))
?
So, e.g.
*if ((x + y /2) >= 60))
*goto success
*else
*goto fail
?
How was that done again?
I think there was a way to have the game check if the result of two variable was within a certain range.
was it
*if ((x + y /2) >= z))
?
So, e.g.
*if ((x + y /2) >= 60))
*goto success
*else
*goto fail
?
I believe you need double brackets. So:
*if (((x+y) /2) >= 60)
*goto success
couple things:
you’ll want to throw in a paren after y, eg (((x+y)/2)>z)
otherwise it’ll throw a fit trying to parse it (at least CSIDE will)–error is something like expected CLOSE_PARENTHESIS was: OPERATOR /
I’m sure someone who can actually code will have a better answer, but i’d just do it with a temp
*temp foo (x+y)
*if ((foo / 2) > z)
*goto success
*else
*goto fail
But yeah, if you add the extra paren it’ll execute as you expect, so just a style choice, depends if you want to save that temporary value to check it against anything later
I’ll do a testrun later on, thank you