I'm having trouble getting an if macro to work when a variable is negative.
I'm using the latest version of twine harlowe online, and I have four passages, set up as follows.
Hello this is a numbers test
do a good thing
do a bad thing
do a good thing:
(set: $goodBad to it +1)
YOU DID GOOD!
do a bad thing:
(set: $goodBad to it -1)
YOU DID BAD!
(if: $goodBad is > 0)[Yay! Good ending! You are nice.]
(else-if: $goodBad is < 0)[Hee hee! You rascal. You are not nice.]
So the problem is this: if I do a bad thing, $goodBad prints out as "NaN" and so my else-if statement in "next" won't work. Does Twine not do negative numbers anymore? Or what? How do I get a number to go less than zero without printing out as "NaN"?
Thanks in advance for your help.