Missing Variables not being shown


#1

When I was working on my game-draft, I was using firefox at the time. But according to the options of the male and female, it does not change the gender variable or keep the information. I am not sure why the missing variables are not being shown in the stats screen as well.

The problem of the choice-script in the startup_text:

*label introduction
You awaken in a dark void as you swim around in the mists of time... You struggle to recollect who exactly you were. Who are you?
*choice
  #Male:
    You are a male.
    *goto male
  #Female
    You are a female.
    *goto female
  *selectable_if (Romance = true) #Intersex:
    *set gender "Intersex"
    *set pronoun "hir"
    You are gender-neutral. Then your gender is ${gender}, right?
    *finish

    *label male
    You are a male and you often wear...
    *fake_choice
      #A navy-blue blazer
        You wear a navy-blue blazer everywhere and you are very punctual as you carry your ${bonus} around.
        *set gender "Male"
        *set pronoun "his"
        *set clothes "blue blazer"
        *set bonus "mobile phone"
        *finish
      #Aftershave and a hefty dose of champagne.
        You like aftershave and drink champagne whenever possible.
        *set gender "Male"
        *set pronoun "his"
        *finish
      #A business suit and tie.
        *set gender "Male"
        *set pronoun "his"
        *set clothes "business suit"
        You wear a business suit. Then your gender is ${gender}.
        *finish
*label female
You are a female and you often wear...
*fake_choice
  #Lipstick and make-up
    *set gender "Female"
    *set pronoun "her"
    *set clothes "some lipstick"
    You prefer to wear lipstick. Then your gender is ${gender}.
    *finish
  #High-heels and a flashy pink bag
    *set gender "Female"
    *set pronoun "her"
    *set clothes "high heels"
    *set bonus "hand-bag"
    You tend to be fashionable with your ${bonus}. Then your gender is ${gender}.
    *finish
  #Singlet with long jeans
    *set gender "Intersex"
    *set pronoun "her"
    *set clothes "long jeans with singlet"
    *set bonus "yo-yo"
    You tend to be outgoing and always active as you play with your ${bonus}. Then your gender is being a tomboy.
    *finish
  #Earrings and jacket
    *set gender "Female"
    *set pronoun "her"
    *set clothes "a jacket"
    *set bonus "earrings"
    You prefer to wear earrings. Then your gender is ${gender}.
    *finish

And here is the choicescript_stats screen:

*stat_chart
  text Name
  text Gender
  text Hair
  text Nationality
  text Personality
  text Family
  text Type
  text Specialization
  text Quirk
  text Realm
  text Current_location
  text Mentor
  text Weapon

  opposed_pair Sanity
    Insanity
  opposed_pair Morality
    Immorality

  percent Psyche
  percent goethe_relation
  percent Vivian_relation
  percent Health
*if (health <=100) and (health > 95)
  Healthy
*if (health <=95) and (health > 70)
  Good
*if (health <=70) and (health > 50)
  Okay
*if (health <=50) and (health > 30)
  Danger
*if (health <=30) and (health > 10)
  Grave-Danger
*if health <=10
  Critical

*line_break
*temp inventory ""
*temp comma false
*if (empty_inventory)
  *set comma true
  *set inventory "You are currently carrying nothing, ${name}"
*if (number_items = 8)
  ${item_one}, ${item_two}, ${item_three}, ${item_four}, ${item_five}, ${item_six}
Inventory: ${inventory}
*line_break
Money: $${Wealth}
*line_break
${name}'s Notepad: ${notes}
*line_break
You are a ${gender} named ${name} ${surname}, who is a ${nationality}. you have ${hair} hair and bright ${eyes} eyes. You also have a ${family} and your nickname is ${nickname}.
Your realm is the ${Realm} Realm and your mentor is ${Mentor}. You like to ${quirk} and you always carry a ${bonus} around at all times.
*line_break
Hints:
*if (goethe_relation >= 1)
   You didn't learn anything yet... The mystery begins!
   *finish
*elseif (goethe_relation >= 3)
   You learn that ${accident} was caused by a demon called Demothus who had a grudge on you. You also learn that the pocket-watch you are holding is called a Reset-Button which is prized by the Gods.
   *finish
*elseif (goethe_relation = 5)
   You learn that Goethe's last name was Irwa, but it seems she doesn't even remember her first name...
   *finish
*elseif (goethe_relation = 10) and (Current_location = "Brimstone Caverns")
   You learn that the demons imprisoned Goethe for a grave crime.
   *finish
*elseif (goethe_relation = 12)
   You learn that
   *finish
*else
   You didn't learn anything yet... The mystery begins!
   *finish

#2

Did you create the variable before you set them?
Also did you make sure to set how you want the statsto be displayed
E.G
Go in the stat text file and go

*stat_chart
  text Name
  text Gender
  text Race

Etc.


#3

Not sure if you can set things within a *fake_choice, although I seem to recall that CS changed and that this should be okay now.

Seeing the *finish, this isn’t in choicescript_stats, is it? Because variable changes don’t stay changed there.

These are global variables, defined in startup.txt ? They can’t be *temp variables, or they won’t exist in the scene file.

Might need to see a little more of the code on either side. How do you display them? Is there a way to get to these choices? Things like that.


#4

I showed the choicescripts_stats page just now. Also had some problem with the elseif statements.


#5

That doesn’t go in the choice script stat page.
The only thing you do with the stat page is things like display stats.
Thats also why choicescript_stats doesn’t go in the scene list


#6

I made my problems a lot more clearer now. I hope that can assist everyone to help me with the missing variables of male and female both not being shown on the stats screen.


#7
  1. Try it without the fake_choice (I know it used to be that you couldn’t do anything in fake_choice, I don’t know what the rules are now, but at the very least your code has no reason to use a fake_ over a normal choice)

  2. That looks like it’s only part of the code, and with what you’ve posted, it’s difficult to tell how a player ends up navigating through it.

  3. Try changing the default to something (such as *create gender “unset”) to double check if it’s not registering the change or if it’s being set to male by something.


#8

I changed gender to “unset”, the missing male and female variables are still not showing up and the game came up with a new error:

startup line 184: It is illegal to fall out of a *choice statement; you must *goto or *finish before the end of the indented block.

#9

Well which line is 184? (If you’re working with a txt editor that doesn’t shows lines, copy/pasta into CJW’s IDE): https://dl.dropboxusercontent.com/u/7840892/CJW/choicescript/tools/IDE/main.html#

There’s a chance your problem stems from something on, or very close to that line.


#10

After some time, I managed to make the missing variables show. Also have some slight problems with the elseif function in choicescripts_stats, is it displayed correctly?

Hints:
*if (goethe_relation >= 1)
   You didn't learn anything yet... The mystery begins!
   *finish
*elseif (goethe_relation >= 3)
   You learn that ${accident} was caused by a demon called Demothus who had a grudge on you. You also learn that the pocket-watch you are holding is called a Reset-Button which is prized by the Gods.
   *finish
*elseif (goethe_relation = 5)
   You learn that Goethe's last name was Irwa, but it seems she doesn't even remember her first name...
   *finish
*elseif (goethe_relation = 10) and (Current_location = "Brimstone Caverns")
   You learn that the demons imprisoned Goethe for a grave crime.
   *finish
*elseif (goethe_relation = 12)
   You learn that
   *finish
*else
   You didn't learn anything yet... The mystery begins!
   *finish

#11

I think you just have your list backwards. It should be sorted from highest requirement to lowest. See, if we set goethe_relation to 5, it hits the first line *if (goethe_relation >= 1), displays the related text, and then skips the rest. You should put the 12 at the top, and go down from there.