# Help me please

**URL:** <https://forum.choiceofgames.com/t/help-me-please/314>\
**Category:** Game Development\
**Created:** [January 12, 2012, 6:26pm UTC](https://forum.choiceofgames.com/t/help-me-please/314 "2012-01-12T18:26:46Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexxo97](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/alexxo97/32/271675_2.png) [@alexxo97](https://forum.choiceofgames.com/u/alexxo97)\
**Post date:** [January 12, 2012, 6:26pm UTC](https://forum.choiceofgames.com/t/help-me-please/314/1 "2012-01-12T18:26:46Z")

</div>

ugh ive been having alot of error messages :these two happen whene i open my game in the index undeterminated string constant and this one:unable to get the value of the property ‘set starting stats clone’: object is null or undefined

this one is whene i open the stats screen:  
unable to get the value of the property ‘scene’ object is null or undefined

---

<div class="post-metadata">

**Author:** ![andymwhy](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/andymwhy/32/34396_2.png) [@andymwhy](https://forum.choiceofgames.com/u/andymwhy)\
**Post date:** [January 12, 2012, 7:36pm UTC](https://forum.choiceofgames.com/t/help-me-please/314/2 "2012-01-12T19:36:54Z")

</div>

Can you post some of the code so we can see.

The second one, it sounds like you didn’t define your variables in mygame.js

---

<div class="post-metadata">

**Author:** ![alexxo97](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/alexxo97/32/271675_2.png) [@alexxo97](https://forum.choiceofgames.com/u/alexxo97)\
**Post date:** [January 12, 2012, 7:48pm UTC](https://forum.choiceofgames.com/t/help-me-please/314/3 "2012-01-12T19:48:55Z")

</div>

// Specify the list of scenes here, separated by commas, with no final comma

nav = new SceneNavigator([  
“startup”  
,“mother”  
,

]);

stats = {  
clone:“1”  
,name: “?”  
,father’s\_race: “?”  
,mother’s\_race: “?”  
,leadership: “10%”  
,strength: “10%”  
,intellect: “10%”  
,power: “0%”  
,agility: “10%”  
,dexterity: “10%”  
,evil: “50%”

};

// Specify the stats to use in debug mode

debugStats = {stats};

that the mygame.js for now

---

<div class="post-metadata">

**Author:** ![alexxo97](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/alexxo97/32/271675_2.png) [@alexxo97](https://forum.choiceofgames.com/u/alexxo97)\
**Post date:** [January 12, 2012, 7:51pm UTC](https://forum.choiceofgames.com/t/help-me-please/314/4 "2012-01-12T19:51:44Z")

</div>

This is a stats screen!

\*stat\_chart  
text name  
text father’s\_race:  
text mother’s\_race:  
percent Leadership:

percent Strength:

percent intellect:

percent power:

percent agility:

percent dexterity:

opposed\_pair EVIL:  
PURITY:

---

<div class="post-metadata">

**Author:** ![alexxo97](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/alexxo97/32/271675_2.png) [@alexxo97](https://forum.choiceofgames.com/u/alexxo97)\
**Post date:** [January 12, 2012, 7:53pm UTC](https://forum.choiceofgames.com/t/help-me-please/314/5 "2012-01-12T19:53:58Z")

</div>

and this is my startup

\*create father’s\_race:  
\*create mother’s\_race:  
\*create percent leadership:  
\*create percent strength:  
\*create percent power:  
\*create percent agility  
\*create percent dexterity:  
\*create percent evil:  
It was a dark and stormy night, two figures where running under the rain. Running and running, the sound of metal and soldiers could be heard in the distance.  
break\_line  
They hid withing a cave and hid theire till their pursuers left. A fash of lighting revealed that one of them was a…  
\*choice  
#…human male  
\*set father;s\_race human  
\*finish  
#…vampire male  
\*set father’s\_race vampire  
\*finish  
#…wherwolfe male  
set father’s\_race Wherwolfe  
\*finish  
#…draconian male  
\*set father’s\_race draconian  
\*finish

---

<div class="post-metadata">

**Author:** ![andymwhy](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/andymwhy/32/34396_2.png) [@andymwhy](https://forum.choiceofgames.com/u/andymwhy)\
**Post date:** [January 12, 2012, 7:55pm UTC](https://forum.choiceofgames.com/t/help-me-please/314/6 "2012-01-12T19:55:03Z")

</div>

I’m guessing in you stats page, you have variables displayed as number? If so you need to get rid of the " and % in mygame.  
Just write the variable as a number:

` ,leadership: 10 ,strength: 10`

And so on. Putting the variable in quotation marks turns it into pure text instead of a number/percentage.

---

<div class="post-metadata">

**Author:** ![alexxo97](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/alexxo97/32/271675_2.png) [@alexxo97](https://forum.choiceofgames.com/u/alexxo97)\
**Post date:** [January 12, 2012, 8:03pm UTC](https://forum.choiceofgames.com/t/help-me-please/314/7 "2012-01-12T20:03:10Z")

</div>

ok thx il try that and ee what happens

---

<div class="post-metadata">

**Author:** ![alexxo97](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/alexxo97/32/271675_2.png) [@alexxo97](https://forum.choiceofgames.com/u/alexxo97)\
**Post date:** [January 12, 2012, 8:05pm UTC](https://forum.choiceofgames.com/t/help-me-please/314/8 "2012-01-12T20:05:10Z")

</div>

so all that happned is the first one changed to syntaxe error

---

<div class="post-metadata">

**Author:** ![Vendetta](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/vendetta/32/533_2.png) [@Vendetta](https://forum.choiceofgames.com/u/Vendetta)\
**Post date:** [January 12, 2012, 8:14pm UTC](https://forum.choiceofgames.com/t/help-me-please/314/9 "2012-01-12T20:14:54Z")

</div>

Don’t use uppercase letters for variable names, e.g.

percent Leadership:  
percent Strength:

should be -

percent leadership:  
percent strength:

That might help.

---

<div class="post-metadata">

**Author:** ![alexxo97](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/alexxo97/32/271675_2.png) [@alexxo97](https://forum.choiceofgames.com/u/alexxo97)\
**Post date:** [January 12, 2012, 8:26pm UTC](https://forum.choiceofgames.com/t/help-me-please/314/10 "2012-01-12T20:26:08Z")

</div>

so i did that and nothing changed

---

<div class="post-metadata">

**Author:** ![Vendetta](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/vendetta/32/533_2.png) [@Vendetta](https://forum.choiceofgames.com/u/Vendetta)\
**Post date:** [January 12, 2012, 8:32pm UTC](https://forum.choiceofgames.com/t/help-me-please/314/11 "2012-01-12T20:32:26Z")

</div>

Hmm. The apostophes in . . . ?

,father’s\_race:  
,mother’s\_race:

try -

,father\_race  
,mother\_race

I dunno tho - grasping at straws here. 😃

---

<div class="post-metadata">

**Author:** ![alexxo97](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/alexxo97/32/271675_2.png) [@alexxo97](https://forum.choiceofgames.com/u/alexxo97)\
**Post date:** [January 12, 2012, 8:36pm UTC](https://forum.choiceofgames.com/t/help-me-please/314/12 "2012-01-12T20:36:44Z")

</div>

didn’t work btw i never heard that expression before 😛 then do you know about the 2 other errors?

---

<div class="post-metadata">

**Author:** ![peglegpenguin](https://avatars.discourse-cdn.com/v4/letter/p/3d9bf3/32.png) [@peglegpenguin](https://forum.choiceofgames.com/u/peglegpenguin)\
**Post date:** [January 12, 2012, 8:39pm UTC](https://forum.choiceofgames.com/t/help-me-please/314/13 "2012-01-12T20:39:08Z")

</div>

There are only two types of variables - string variables and number variables. Once a variable is given a string value, it is stuck forever being a string variable. Same with number variables. You can put numbers in strings (like “door3” or even pure number strings like “2322”). The percent thing in your stats takes only number variables and uses them to make fancy percent bar things. If you give it a variable holding the value 50, it will show a half-full percent bar thing. Just don’t give it anything above 100 or below 0. If you give it a string variable (even if the string only has numbers) the computer will get mad and yell at you. Not that that’s the only issue.

You also can’t put a ’ in a variable name. Might want to change those variables to fathers\_race or father\_race.

You do not want to \*create a variable that you already mentioned in the mygame.js. Those variables are global variables, meaning the mygame.js already told all your scenes about those variables. You would \*create a variable if… actually, I don’t really know when you’d really use that command. It essentially creates a global variable somewhere in the middle of your code. One that will crash the game if you try to access it before it is created. Also, if you do use \*create (or its more useful sister, \*temp), do not end the statement with a : .

Also, not sure what break\_line is. Did you mean \*page\_break? Without the “\*”, the command will be read as text to be displayed as part of the story. Also make sure you change it to \*page\_break, not \*break\_line.

Can’t check the indentation on the forum unless you add a “\< code\>” before the code and “\</ code\>” after it (no spaces). Remember when I made fancy yellow stuff in my text? That was me using \< code\> to tell the forum that I wanted to keep my spaces. I don’t think indentation is an issue here though since you didn’t get an error message about that.

…and about the clone thing, that was me being a unnecessarily confusing idiot. Making that variable doesn’t do anything other than make a variable. Unless you have a use for a variable called “clone”, go ahead and get rid of it.

Also, a typo - werewolf was spelled wherwolfe.

---

<div class="post-metadata">

**Author:** ![alexxo97](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/alexxo97/32/271675_2.png) [@alexxo97](https://forum.choiceofgames.com/u/alexxo97)\
**Post date:** [January 12, 2012, 8:45pm UTC](https://forum.choiceofgames.com/t/help-me-please/314/14 "2012-01-12T20:45:39Z")

</div>

ugh the first error changed again to: expected identifier string or number

adn the 2 others are still there

---

<div class="post-metadata">

**Author:** ![Rob](https://avatars.discourse-cdn.com/v4/letter/r/838e76/32.png) [@Rob](https://forum.choiceofgames.com/u/Rob)\
**Post date:** [January 12, 2012, 8:48pm UTC](https://forum.choiceofgames.com/t/help-me-please/314/15 "2012-01-12T20:48:15Z")

</div>

Forgive me if I’m wrong but isn’t \*create not used anymore to set up

---

<div class="post-metadata">

**Author:** ![alexxo97](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/alexxo97/32/271675_2.png) [@alexxo97](https://forum.choiceofgames.com/u/alexxo97)\
**Post date:** [January 12, 2012, 8:50pm UTC](https://forum.choiceofgames.com/t/help-me-please/314/16 "2012-01-12T20:50:19Z")

</div>

apparently so and i removed it i put it in in the first place because of the code for choice of dragons that they show you as an example

---

<div class="post-metadata">

**Author:** ![peglegpenguin](https://avatars.discourse-cdn.com/v4/letter/p/3d9bf3/32.png) [@peglegpenguin](https://forum.choiceofgames.com/u/peglegpenguin)\
**Post date:** [January 12, 2012, 8:51pm UTC](https://forum.choiceofgames.com/t/help-me-please/314/17 "2012-01-12T20:51:48Z")

</div>

Also, you put a some more colons in the stats page. It should just be text variable\_name, not text variable\_name:

And, your opposed\_pairs thing needs to be changed. It should use the following format:  
`*stat_chart opposed_pair rightness leftness rightness`

That displays as:

leftness [_ **50** _] rightness

Where rightness of 100 means very right, and rightness of 0 means very left.

---

<div class="post-metadata">

**Author:** ![alexxo97](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/alexxo97/32/271675_2.png) [@alexxo97](https://forum.choiceofgames.com/u/alexxo97)\
**Post date:** [January 12, 2012, 8:55pm UTC](https://forum.choiceofgames.com/t/help-me-please/314/18 "2012-01-12T20:55:45Z")

</div>

and the first error changes again now its: invalid character

and the 2 others remain ugh

---

<div class="post-metadata">

**Author:** ![peglegpenguin](https://avatars.discourse-cdn.com/v4/letter/p/3d9bf3/32.png) [@peglegpenguin](https://forum.choiceofgames.com/u/peglegpenguin)\
**Post date:** [January 12, 2012, 8:57pm UTC](https://forum.choiceofgames.com/t/help-me-please/314/19 "2012-01-12T20:57:07Z")

</div>

Can you paste your code again?

---

<div class="post-metadata">

**Author:** ![alexxo97](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/alexxo97/32/271675_2.png) [@alexxo97](https://forum.choiceofgames.com/u/alexxo97)\
**Post date:** [January 12, 2012, 8:58pm UTC](https://forum.choiceofgames.com/t/help-me-please/314/20 "2012-01-12T20:58:07Z")

</div>

sure all of it?

[Next page](https://forum.choiceofgames.com/t/help-me-please/314.md?page=2)
