I need help with stats

Hello, I’m Sophie, kinda new here (like, newborn baby new) to the forum. I don’t quite know if this is an allowed question or if it’s been asked and answered, so if I need to take this down I will do so.

The problem I’m running into is command prompts(?) when it comes to stats. I am using CSIDE on my windows laptop and as I’m doing little test runs for my story, I get an error that says "Non-existant variable ‘distrustful’ "

My code looks like:
*stat_chart
opposed_pair Distrustful
Trustful

2 Likes

You have to declare the variable first in your “startup” file, like this

*create distrustful 50

Also, keep in mind that since that’s an opposing pair, when you want to become more trustful, you will have to modify the distrustful variable.

1 Like

thank you for the reply! I tried it ans my apologies maybe I’m still doing it wrong? I went into my startup and typed


*create Distrustful 50

and yet its still giving me an error as “Non-existent variable”. Am I supposed to write something else?

Just tried it in a test project and it works. Are you sure you are indenting your stats correctly? Your choicescript_stats file should look like this

*stat_chart
    opposed_pair Distrustful 
        Trustful

opposed_pair has one tab in front of it and Trustful has two.

1 Like

Yep, that’s exactly what it looks like! I tried to take a picture but the forum says I can’t embed a photo:( Thanks for chiming in to help, somehow it won’t go through on mine

1 Like

Did you write *create Distrustful 50 at the top of startup.txt? *create will not work if you put it after some commands like *page_break.

2 Likes

IT FINALLY WORKED!! yay, thank u so much. I’ve been wondering where I’d been going wrong—I even watched a tutorial and it didn’t click that I was supoosed to write it at the top. thank you very much :sparkling_heart:

1 Like

You’re welcome! Glad I could help.

2 Likes

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.