choicescript
choicescript copied to clipboard
Two stages needed to *set a negative value on a new *temp
The following will not work:
*temp mytemp *set mytemp -1
The workaround:
*temp mytemp *set temp 0 *set temp -1
This issue has both to do with NUMBER as well as how setVar looks for an operator at the start of the string. What winds up happening is that temp.mytemp is equal to null, and setVar attempts to -=1 to it in the call to set.
Similarly, one can't compare a variable against a negative number, like (number < -10); one has to compare ((0 - number) > 10) instead.