# Choicescript errors

**URL:** <https://forum.choiceofgames.com/t/choicescript-errors/1037>\
**Category:** ChoiceScript Help\
**Created:** [December 30, 2012, 8:37pm UTC](https://forum.choiceofgames.com/t/choicescript-errors/1037 "2012-12-30T20:37:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![avierre](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/avierre/32/198576_2.png) [@avierre](https://forum.choiceofgames.com/u/avierre)\
**Post date:** [December 30, 2012, 8:37pm UTC](https://forum.choiceofgames.com/t/choicescript-errors/1037/1 "2012-12-30T20:37:55Z")

</div>

When I open index.html in IE, it gives me the errors " ‘first\_name’ is undefined" and " ‘stats’ is undefined", but when I looked in the mygame.js file, I couldn’t find what I did wrong.  
Here it is:

```

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

nav = new SceneNavigator([
	"intro"
]);

// Specify the default starting stats here

stats = {
	first_name: "Unknown"
	,last_name: "Unknown"
	,full_name: (first_name&" ")&last_name
	,gender: "Unknown"
	,title: "None"
	,greeting: "None"
	,strength: 0
	,wisdom: 0
	,magic: 50
	,physical: 50
};

// Specify the stats to use in debug mode

debugStats = stats;

// or just use defaults
// debugStats = stats

```

I’ve checked my indenting and all of them are one-tab indents, and the “stats = { };” part is the same as the original mygame.js, which does work. What did I do wrong?

---

<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:** [December 31, 2012, 5:19am UTC](https://forum.choiceofgames.com/t/choicescript-errors/1037/2 "2012-12-31T05:19:29Z")

</div>

@avierre

,full\_name: (first\_name&" ")&last\_name

It’s falling foul of that line, so resulting in ‘stats’ as a whole being undefined.

In mygame.js set full\_name to a default of “Unknown” as well and use the concatenation in your actual story scripting (i.e. \*set full\_name accordingly immediately after the player has chosen first\_name and last\_name).

---

<div class="post-metadata">

**Author:** ![avierre](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/avierre/32/198576_2.png) [@avierre](https://forum.choiceofgames.com/u/avierre)\
**Post date:** [January 1, 2013, 7:27pm UTC](https://forum.choiceofgames.com/t/choicescript-errors/1037/3 "2013-01-01T19:27:12Z")

</div>

It worked, thanks!
