Error #I under choice (Resolved)


#1

I receive the following error
Error: p_8 line 19: Non-existent variable ‘i’ which I am a little unsure why. “i” is not a var but part of I am done after the # I have

9 *label top
10 *choice
11  *selectable_if (flaw_sheet) #Flaws
12   Adding a flaw to your character will increase how many additional points you can use towards stats and weapons. 
13   *line_break
14   *goto c_flaws
15  *selectable_if (stat_sheet) #Stats
16   *goto c_stats
17  *selectable_if (weapons_sheet) #Weapons
18   *goto c_weapon
19  *if not(((flaw_sheet) and not(weapons_sheet)) and not(flaw_sheet)) #I am done
20    *if ((stat_count>=1) or (weapon_count>=1)) 
21      Are you sure you want to move on
22     *choice
23       #Yes 
24        *goto_scene p_9
25       #No
26        *goto top
27    *if ((stat_count<=0) and (weapon_count<=0)) 
28      *goto_scene p_9

Any idea would be great thanks.


#2

Hi, I just checked the wiki, and saw this:

*If not (var) will work correctly only if this check occupies a line of its own.

In order to work correctly, that code should actually be written as:

*choice

  *if not (var)

    #This option to be displayed

      *goto next

There might be a problem with the parenthesis too? Unsure on this one, but I hope it helps, I’m far from being an expert :sweat:


#3

Well all three are true or false so if all three are set false it should give me the choice I am done

*if not(((flaw_sheet) and not(weapons_sheet)) and not(flaw_sheet)) #I am done

alright have it working, I wonder if not() does not function in this type of setup I have as I have changes it to

*if (((flaw_sheet=false) and (weapons_sheet=false)) and (flaw_sheet=false)) #I am done

and it works fine now.