*if gender male issue?


#1

So I keep getting this error: fatherson line 20: Invalid expression at char 13, expected OPERATOR, was: STRING [“male”]

When trying to use this code:

*set age 17
As you drift through the blackness you think about who you are...
*choice
  #I am a boy.
    *set gender "Male"
    As you awake you know you are a ${gender}.
    *page_break
    *goto waking
  #I am a girl.
    *set gender "Female"
    As you awake you know you are a ${gender}.
    *page_break
    *goto waking

*label waking
*if terror
  As you wake, now 17 years old, you feel that same emotion of terror running through you once again. You head over to your
  cheap wooden desk, and pick up the bracer with your father's name "Rannulf" next to your name...
*label namelist
*if gender "male"
  *choice
    #Gundric
      ...Gundric, Are you sure?
    #William
      ...William, Are you sure?
    #Alderman
      ...Alderman, Are you sure?
    #I'll pick my own name.
      So what's your name?
      *input_text name
      So your name is ${name}?
      *choice

Anything I’m doing wrong?


#2
  1. Case sensitivity: “Male” does not equal “male”

  2. You’re lacking an operator in your *if. It should be *if gender = “male”


#3

Choice script is so confusing for someone like me who has never coded before in my life.


#4

Ah okay I see, yeah, I added the equal sign and changed it to “Male” instead of “male” and it works great, thank you :smiley: