Stats screen issues

Hello all! I have a story I want to post on the forum however I have a major issue preventing me from doing so.
The stats screen. I have been testing the intro out and tried to enter the stats screen and found this:
choicescript_stats line 25: Non-existent variable ‘charisma’

Now I have no clue what I did wrong and I was hoping you guys could tell me. Here is what I have for both my intro page and the stats page. I hope you guys can help me out!

This is the beginning of my intro page

*title Dragon Poop for Sale
*author Mae Cameron
*scene_list
__IntroPage
__Chapter1
__Chapter2
__Chapter3
__Chapter4
__Chapter5
__Chapter6
__Chapter7
__Chapter8
__Chapter9
__Chapter10
__ending
__death

*create name
*create charisma 0
*create strength 0
*create magicpool 0
*create magicskill 0
*create willpower 0
*create health_level 100
*create intellevel 0
*create mswetherston 0
*create mswetherstonromance 0
*create mrfliiner 0
*create mrfliinerromance 0
*create partner 0
*create partnerromance 0
*create friendship1 0
*create friendship1romance 0
*create friendship2 0
*create friendship2romance 0
*create friendship3 0
*create friendship3romance 0

And here is my stats page

*stat_chart
– -percent health_level Insert funny health pun here
__percent strength Dem Guns
__percent charisma Silver Tongue
__percent willpower Mind Bender
__percent magicpool Power Level
__percent intellevel Bat manning

I am not sure what I did wrong, please help…

I maybe wrong but I believe when working with percent you cannot have a 0 in the var, start with a 1 and see if that solves the problem.

I notice name var is empty need something like
*create name “”

How to format your code so it can be seen on the forum.

Paste code into window.
Highlight all of the code.
Click the preformatted text button. (It looks like </> and is next to the quote one and on the same bar as the other formatting and smilies choice.)
Click reply.

1 Like

Doublecheck startup.txt and make sure it’s the most up to date version and that it’s saved.

If charisma has been created in startup.txt I’m not sure why it’s having issues in choicescript_stats.txt

2 Likes

This is my stats page:

[i]Watch your thoughts;
*line_break
They become your words.
*line_break
[i]Watch your words;
*line_break
They become actions.
*line_break
[i]Watch your actions;
*line_break
They become habits.
*line_break
[i]Watch your habits;
*line_break
They become character.
*line_break
[i]Watch your character;
*line_break
It becomes your destiny.
*line_break
~[b]Lau Tzu

*stat_chart
  percent health_level Insert funny health pun here
  percent strength Dem Guns
  percent charisma Silver Tongue
  percent willpower Mind Bender
  percent magicpool Power Level
  percent intellevel Bat manning

And this is my Intro page:

*title Dragon Poop for Sale
*author Mae Cameron
*scene_list
  IntroPage
  Chapter1
  Chapter2
  Chapter3
  Chapter4
  Chapter5
  Chapter6
  Chapter7
  Chapter8
  Chapter9
  Chapter10
  ending
  death

*create name ""
*create charisma 0
*create strength 0
*create magicpool 0
*create magicskill 0
*create willpower 0
*create health_level 100
*create intellevel 0 
*create mswetherston 0 
*create mswetherstonromance 0 
*create mrfliiner 0
*create mrfliinerromance 0 
*create partner 0
*create partnerromance 0
*create friendship1 0
*create friendship1romance 0
*create friendship2 0
*create friendship2romance 0
*create friendship3 0
*create friendship3romance 0

Is it possibly because you’re creating the stat at 0? If you create it at 1 (or any other number) do you still get the same issue?

I don’t know cause it is now giving me this:

choicescript_stats line 24: Non-existent variable ‘health_level’

Very odd - it’s as if the startup.txt your stats page is using is different to the one you’re editing / have posted the contents of there. I can only imagine that at some point you’ve saved your startup file to a different folder than …\web\mygame\scenes, and have since been editing / adding to that new save rather than the older one in that folder.

Worth double-checking.

1 Like

Yeah you might be right.

Luckily I didn’t get that far into writing the story and only had a couple of paragraphs done. If I can’t find the issue within the next half hour I think I might just rewrite my stats screen.

No need! If that is the problem, all you need to do is move the startup file from wherever it currently is into the …\web\mygame\scenes folder, where it will overwrite your old startup.txt. Everything should be fine then.

I think I see what I did. It appears that I have two startup pages in my saved folder!
I think I must have hit the save as instead of the save button.

Easily done when you’re just getting into things, don’t worry about it - just make sure it’s the oldest one you delete!

Shameless Plug Time: if you use a PC or Mac, in the not-too-distant future you’ll be able to download & use CSIDE instead, which I heartily recommend you do (I’m a beta tester for it). It’s free to use and makes project management & file handling a doddle, completely eliminating the sort of problem you’ve just had there, and also includes / automatically updates its own ChoiceScript files so you never have to mess about with updating those either. Moreover, you don’t need a separate text editor / browser setup for writing & testing your game, as it handles all of that (and much more) in one cool package.

2 Likes