The error I’m getting is: line 4 of choicescript_stats: Non-existent variable ‘name’
My code looks like this:
This is a stats screen!
*stat_chart
text name
percent intelligence
percent wisdom
I followed the one on the mygame folder from ChoiceScript. I was wondering if the mistake was the location of this code. Like, which page do I even input this code, in the choicescript_stats or startup?
Send help. I need help. Please. Thanks. Bless your kind soul.
Hi, you need to have all stats and variables listed in your startup.txt file. You list stats in your startup.txt file by using the *create command. So you would need to put
*create name ""
in your startup file for the name stat to work. The same goes for all your other stats. You can see more examples here on the ChoiceScript wiki. Do your best to try these tutorials out as well as utilizing the Ultimate Noob Coding thread!
Hi. I’m having the same problem.
This is what I put in my startup file:
*create firstname “unknown”
This is what i put in my choicescript_stats file: Name: $!{firstname}
And this is the error message I keep getting:
"line 5 of choicescript_stats: Non-exixtent variable ‘firstname’
I have no idea what to do. Shouldn’t it just show the Name as blank? It won’t even go to the stats page, at all. Thank you, David.
That’s weird! First thing I’d ask is: how are you coding? Did you save your startup file before running the game? Is your startup file named startup.txt and in the right place—e.g. in your game folder?
Dashingdon is a website created by the user @dashingdon and it’s purpose is to give authors a free and easily accessible way to post demos of their WiP.
Hi @DavidMonster I think the problem is that you have *finishbefore your scene list or the creation of your variables in your startup file. That command makes the scene end before the game can read and establish the variables you create underneath it. Try moving *finish to the very end of your startup file and hopefully that solves the problem.
Thanks. I’ll try it out, and let you know what happens. THANKS.
— I did this, and went all the way back to just the 1st step. Took everything out, and started over and that worked. THANKS!