Non-existent variable stealth


#1

Hey can someone help me with this issue? I keep getting a message saying choicescript_stats line 3: Non-existent variable 'stealth". here is my code,
*stat_chart
text name
percent stealth
opposed_pair public support
public distain
percent weapons
percent charisma
text Stealth
text weapons
text Charisma


#2

Did you do

*create stealth ""

or

*create stealth 0

at the top of your startup.txt? Your error line reads to me like you just forgot to make the variable, which means that your stats page can’t access it; if it’s not created, it doesn’t exist yet!


#3

thank you so much for that, if you don’t mind answering?
do I do the same things for the opposing stats?


#4

Mhm! That sounds right.

You can read a bit more about opposed pairs here: https://www.choiceofgames.com/make-your-own-games/customizing-the-choicescript-stats-screen/

I don’t use them much, so maybe a forum-goer with more experience can chime in if I’m wrong here. :sweat_smile:


#5

You don’t have to have the opposed stat in your startup. Say one stat’s name is ‘good’, and the opposed name is ‘bad’. ‘Good’ will be a variable, but ‘bad’ doesn’t need to be defined, it’ll depend only on what the value of ‘good’ is.


#6

okay so I will just have do *create good? or what not?


#7

Exactly, just like what SwanMaiden said, you have to use either

*create good ""
or
*create good 0
or
*create good false