Stat help

ok so not sure how to do something in choicescript.
the problem that im having is i can’t get the stats to show the name im not sure how to do it, i have read the wiki but i still have no clue. i keep getting told line 2: Non-existent variable ‘name’ when i click on the stat button
this is what i have in my stat txt file:
*stat_chart
text name

now you go to mygame.js inside the my game folder and add the stat under the stat chart there

almost at the end there is this thing it goes like this :


// Specify the default starting stats here

stats = {
   name: "unkown"
   ,sex: "unkown"
   ,swordfighting: 0
   ,archery: 0
   ,strength: 0
   ,intelligence: 0
   ,sky: 0
   ,sea: 0
   ,earth: 0
   ,weapons: "none"
   ,other: "none" 
};

// Specify the stats to use in debug mode

these are my stats for the game so u just have to put name and if ur going to let the player choose the name then do name: “unkown”

do u get wat iam saying ???

yep thank you thats really helped me

no prob and you might also want to do this otherwise the stats will show twice
after the stats there r debug stats

instead of keeping it like this:


// Specify the stats to use in debug mode

// debugStats = {
            name: "none"
   
};

// or just use defaults
// debugStats = stats

change it to:


// Specify the stats to use in debug mode

debugStats = {
        name: "none"
};

// or just use defaults
// debugStats = stats

ok i will do that and again thank you

no prob :stuck_out_tongue:

wat is ur games name?

not got one yet, im mostly trying to learn choicescript for a news years resolutions which is to learn a skill of some kind (i know that its a bit early but i wanted to get the basics done first)

lol don’t rush i started making my game the first day i sign up i learned the basics in about 2 hours and then i just rushed and made a demo and it was horrible i had to restart it twice all ready

ok if u need anymore help ask me :wink: