Hi everyone, I’m having problems with a line of code.
The line looks like this:
*if (gtoken = true) and (ntoken = true) and (atoken = true) and (btoken = true) #Finish.
I even tried already:
*if ((gtoken = true) and (ntoken = true) and (atoken = true) and (btoken = true)) #Finish.
The error it gives me is: Invalid expression at char 39, expected no more tokens, found: NAMED_OPERATOR (and)
There are some conditions(it’s a character creation) that would make the ‘tokens’ turn true from false and allow the reader to go on with the story but even if the code looks legit to me it is wrong
When used as part of an #option within a *choice, all of the checks must be within a single pair of parenthesis. So if an extra pair were wrapped around that section of @Nocturnal_Stillness’s sample, giving you something like: *if (((gtoken) and (ntoken)) and ((atoken) and (btoken))) #Finish.
Then it should work.
Note that the extra pair of parenthesis shouldn’t be necessary outside of a *choice. In other parts of your code, it should work exactly as suggested.
No worries. @Minnow’s right.
You just need additional parens to enclose Sam’s @Nocturnal_Stillness code to make it work. Besides, his code looks easier to the eyes, speaking of the balance between right and left…