While I was working on my stats page, I came across a few issues with negative numbers. I’m uncertain if I’m doing something wrong or if the problem lies in ChoiceScript itself.
First off, in my startup scene, I am unable to create variables with default values below zero. For example, the following line of code:
*create pc_arcana -1
… Results in the following error:
“Invalid create instruction, value must be a a number, true/false, or a quoted string: pc_arcana -1”
Secondly, I am unable to use negative values in conditional statements, for example:
*if (pc_arcana = -1)
… Results in the error:
“Invalid expression at char 14, expected NUMBER, STRING, VAR or PARENTHETICAL, was: OPERATOR [-]”
I was able to circumvent both issues, but in both cases, they are less then satisfactory solutions. Any guidance is much appreciated, and thanks in advance!