Not a number: true

Recently changed a variable from boolean to integer, and I am getting “Not a number: true”, error on the *if (Lunete_court >= 1) line.

*if (Lunete_court = 0)
    *goto afterthat
*if (Lunete_court >= 1)
    Lunete trails in after you.
    *if not (touch_averse)
        She comes up behind you and wraps her arms around your waist.
        *fake_choice

Can you post your stats page? What do you have Lunete_court initialized to?

edit: to be a little more helpful, if you’ve initialized it to true or false you won’t ever be able to make it a numeral, you would need to set it to 0 or 1 instead on creation.

Here’s a tip from Data types | ChoiceScript Wiki | Fandom :

TIP : When first defining a new permanent boolean variable using the *create command in startup.txt (or creating a new *temp one in any scene file), consider carefully if a simple value of true or false is definitely all you will ever need to use this particular variable for. If there is even a small possibility that you may want it to contain different information at some point in the future, consider instead making it a numeric variable with a starting value of either 0 (false ) or 1 (true ). To all intents and purposes this can be used as a boolean , but also allows for future variation of use with a value of 2, or 3, or . . .

1 Like

You could have missed a *set Lunete_court true somewhere before that *if.

I recommend doing a global search/replace for *set Lunete_court to check that out.

3 Likes

Thanks, that was it.

1 Like

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.