Not a number: None

So I just fixed an error with indenting (thanks to those who helped), but now I have a new error.

Not a number: None

Below is the full code. The line number ChoiceScript IDE is highlighting is line 23 here (so the cord1 below *else)

#Gather materials
  (text here)
  *choice
    #Gather Wood (this one is working fine, so I will not post this)
    #Gather Cordage
      (text here)
      *if ((item1 = "Yes") or (item2 = "Yes")
        (text here)
        *set cord1 +2
        *if (time1 = "1")
          (text here)
          *set time1 2
          *goto (label name)
      *if (((item3 = "Yes") or (item4 = "Yes")) or (item5 = "Yes"))
        (text here)
        *set cord1 +5
        *if (time1 = "1")
          (text here)
          *set time1 2
          *goto (label name)
      *else
        (text here)
        *set cord1 +2
        *if (time1 = "1")
          (text here)
          *set time1 2
          *goto (label name)

The error message points to a wrong variable, did you create every used variable? I don´t know choice script well, at the moment, but none in other programming languages mostly means that you created a variable without a value

Every variable is created & i double checked my none vs no, just to make sure i said the right one

Try not putting number variables in quotation marks. That makes choicescript think it is dealing with a string rather than a number variable.

Other note:

  *if ((item1 = "Yes") or (item2 = "Yes")

That needs a closed paren at the end.

The issue is you set time1 as both a string “” and then just a number.

The “” had no effect, no errors and worked ok but the same issue came up.

@Nocturnal_Stillness A lot of choices have it like this, but this is the only one having an issue

So cord1 is supposed to increase by 10.

if I add “” around the +10, the stats now say: Cordage +10 instead of Cordage 13
How do I increase the number by 10, instead of to +10

*set cordage +10 is how you increase the number by 10.

In general, the quotation marks are used for strings, and without, for numbers. You shouldn’t need quotation marks when dealing with mathy stuff.

It should have an effect though. As anything in “” is consider a string

So *set books “1” would be considered a string by choicescript

*set books 1 would be considered a number

So if you use *set books “1” and then *set books 1 it should have caused an error. I’m surprised it doesn’t

Yeah, it’s weird that it wouldn’t throw an error. @hexfur, you’ll want to be sure that your created variable is *create cord1 0 if you want it to be a number. (or whatever number you want it to start at.)

*create cord1 “0”

That’s how it reads in my *create list. Wood is the same way, but that’s having no problems :frowning:

@Nocturnal_Stillness I’ll remove the “” from some things, see if that makes a difference. I’ve never had a problem with them before but i’m also new to the choicescript ide

This issue is replicating throughout multiple other choices now

Apparently, people can read your scenes if you have a game on Dashingdon.com
Here’s the game I’m making, just uploaded the files: https://dashingdon.com/go/3059

Yeah, definitely make it *create cord1 0. And do that to all the variables you want to add/subtract from. That will solve a lot of things.

And then, when you have your *if statement, check *if blah = 0 rather than *if blah = “0”, and of course change all of your *set lines to *set blah +10 instead of *set blah “+10.” Oodles of errors will clear up this way. Maybe not the specific one we’re after here, but still oodles down the road.

Same exact issue popped up. Nothing changed :frowning:
& when I’ve set up things like that before, where it adds something, i never put:
*set variable “+10”
because it always screws it up, and makes it Variable +10 instead of Variable 10

Yes, right. Then you’ve done it correctly those times to omit the quotation marks.

But this original issue is still happening

Edit: It’s only happening with the *else statement part of that choice now

Edit 2: Changed the *else to *if ((((axe1 = “none”) or (axe2 = “None”)) or (fknife1 = “None”)) or (fknife2 = “None”)) or (bknife = “None”)), same exact issue

Ok so I found a way to fix it. I just made a new variable, sharpob, and set it so that if you have any kind of knife it changs sharpob to yes

Is there a reason you’re setting item1, item2 etc. to “yes” and “no” instead of true/false? It would make your life much easier if you used boolean variables.