I’m having some issues with the stats. I can’t have a headlines above them, basically. I had to go over to the startup file and add the phrase with a value (I guess? I think I’m using the right terminology) after it for me to be able to get to the stat page. Without it, the message “Non-existent variable” comes up.
So I went ahead to startup and added: *create Character_traits 0, but then it says 0 in the title when I try to run the game. I guess that’s logical but how come the text command won’t do?
What am I missing? My statfile looks like this:
*stat_chart
text Character_Traits
opposed_pair Open
Withdrawn
opposed_pair Hasty
Deliberate
opposed_pair Optimistic
Pessimistic
opposed_pair Biting
Absolute
I tried finding topics about this but I couldn’t. If there has been a post about this then I’m sorry!
/Toco
Umm… I’ll try using a real-life analogue.
If you want to make a bread, you’ll need flours. Not just any flour, but a flour that suits your needs.
In programming language, you’ll need variables. Not just any variables, but a variable that suits your needs.
In ChoiceScript, there’re 3 kinds of variable: text, number, and on/off (boolean or true/false)
*create [varname] "lul" gives you a text variable *create [varname] 1945 gives you a number variable *create [varname] true gives you a boolean variable
For a quick explanation, you can only use
*stat_chart
text varname
on a text variable.
If you want to get familiarized with the basics,
Click me ah
So, we got 3 kinds of variables. Hurray!
In above example, the variable is called [varname]. The contents are “lul” for text variable, 1945 for number, and true for boolean.
Now, in CScript, you’re not allowed to *create a blank variable. You need to specify their type.
That’s why you need to add text after the *create Character_Traits (Of course, you can put any text inside it. Doesn’t have to be “lul”)
The others are just the same, except number or true/false instead of texts.
Y’know, I just realised I got it wrong from the beginning. I just wanted to write a headline over the stats, and that was possible without any code. Gosh, now I feel stupid. But atleast I know more about variables. Thank you so much for taking the time to answer!
So I just had to erase what create commands I had in the startup file (related to this), and add “Character Traits” in the stat file: