I’m very, very new to Choicescript (and coding in general), but I can’t seem to figure out how to get my stats screen to show up? Every time I test it, I get: choicescript_stats line 4: Non-existent variable ‘name’
This is what I have been working with:
*stat_chart
__text Name
__text Gender
__text Sexuality
__text Partner
__text Weapon
__percent Combat
__percent Intelligence
__percent Perception
__percent Stealth
__percent Charisma
__percent Strategy
__percent Magic
__percent Medicine
__opposed_pair Compassion
____Cruelty
__percent Amir
__percent Frieda
__percent Wayan
__percent Taika
__percent Boro
__opposed_pair Chandice
____Nirav
Do I need to set these up elsewhere, like in the start-up file, for them to work on the stats screen? Note that I have only written this in the stats file, and nowhere else. ;u;
Also, please ignore the italicised ‘opposed,’ it’s because it has an underscore on either side and I have no idea how to negate that without looking like I coded that part incorrectly. ;A;
Yeah, you need to *create each of your variables in the startup.txt
so for name it’d be
*create Name “Your name here”
You have to initialise all stats in the startup file, like so: *create name ""
for strings (words) or *create combat 0
for numbers. (Don’t worry about the initial value, as you’ll change it later.)
You can also quote blocks of code using the grave (`). Use it three times in a row for a full block quote:
*stat_chart
text Name
text Gender
text Sexuality
2 Likes
quotes indicated that the variable is a string (words)
numbers don’t need quotes, and neither do True/False variables
You should check out the choicescript wiki on variables for some specifics
1 Like
@Xionide @ParrotWatcher That really helps, thank you so much!