Looking for help

I was wondering if you could help me with a problem in my Choicescript. I have looked at all the pages on setting my Stats but there seems to be a problem when I try to make them work. Here is what I did but it seems to tell me Strength undefined.

In mygames.js :

// Specify the default starting stats here

stats = {

Strength: 20
,Stamina: 20
,Speed: 20
,Intelligence: 20
,Charisma: 20
,Endurnce: ((Strength + Stamina)/2)
,Reaction: ((Stamina + Speed)/2)
,Learning: ((Speed + Intelligence)/2)
,Presence: ((Intelligence + Charisma)/2)
,Angel: 0
,John: 0
,Lisa: 0
,Max: 0
,Mike: 0

};

// Specify the stats to use in debug mode

debugStats = {

Strength: 20
,Stamina: 20
,Speed: 20
,Intelligence: 20
,Charisma: 20
,Endurnce: ((Strength + Stamina)/2)
,Reaction: ((Stamina + Speed)/2)
,Learning: ((Speed + Intelligence)/2)
,Presence: ((Intelligence + Charisma)/2)
,Angel: 0
,John: 0
,Lisa: 0
,Max: 0
,Mike: 0

};

// or just use defaults
// debugStats = stats

In my startup.txt

*stat_chart
text Name
text Gender
text Strength
text Stamina
text Speed
text Intelligence
text Charisma
percent Angel
percent John
percent Lisa
percent Max
percent Mike

Your help will be appreciated.

Name and Gender in startup.txt have not been declared in mygames.js
add ,Name: “none” ,Gender: “none” to the list of stats.

The lines you list in your startup.txt, did you mean your choicescript_stats.txt? Your stat_chart should be in choicescript_stats.

You need to change your default stats. All default stats should be either a number or text. Replace:

,Endurance: ((Strength + Stamina)/2)

with

,endurance: 20

Similarly for Reaction, Learning and Presence.
Then, in one of your .txt files, put the line:

*set endurance ((strength+stamina)/2)

Again, do the same for reaction, learning and presence.

Also I don’t know if this is going to work:Endurnce: ((Strength + Stamina)/2)

What I would do is just set Endurnce: 0 in mygame.js
and add the line

*set Endurnce ((Strength + Stamina)/2)

to the first scene (text file) of your adventure.

Wow, three people helping Veger77503 at the same time!

Also, all variables should be named in lowercase only. ‘Strength’ and ‘strength’ won’t be read as the same thing. Make all variables lowercase.

Thank you will try the changes.

Cool it worked thanks all.