# Invalid character?

**URL:** <https://forum.choiceofgames.com/t/invalid-character/1039>\
**Category:** ChoiceScript Help\
**Created:** [December 31, 2012, 5:46am UTC](https://forum.choiceofgames.com/t/invalid-character/1039 "2012-12-31T05:46:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![haqeirah](https://avatars.discourse-cdn.com/v4/letter/h/e47774/32.png) [@haqeirah](https://forum.choiceofgames.com/u/haqeirah)\
**Post date:** [December 31, 2012, 5:46am UTC](https://forum.choiceofgames.com/t/invalid-character/1039/1 "2012-12-31T05:46:59Z")

</div>

I tried adding another scene by editing the mygame.js file and creating the text file in the scenes folder but got a “permision denied” error. I read somewhere that unblocking the files would solve the problem, but when I did this, I got an “invalid character” error, and when I try to start the game, it says that I need to enable javascript. I know javascript is enabled because before the game worked fine. What should I do? Thanks in advance.

---

<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, 6:25am UTC](https://forum.choiceofgames.com/t/invalid-character/1039/2 "2012-12-31T06:25:38Z")

</div>

@haqeirah At a wild guess, I would have to say it’s possibly not been unblocked properly, as “Invalid Character” seems to be the typical error for that:

> **[Error messages](https://choicescriptdev.fandom.com/wiki/Error_messages)**
>
> As a ChoiceScript programmer, you will definately encounter errors, sooner or later, while testing your game. If you encounter errors, a popup box will appear, telling you what line the errors occurs on, and as well what the error is. Below, you will...

I think in this case I would be tempted to move my own .txt files safely elsewhere, zap ChoiceScript entirely, and go with a fresh download / unblocking before putting my own .txt files back in place. If you already have lots of variables set up in mygame.js, copy & paste those to a text file first (for pasting back in afterwards)–i.e. don’t be tempted to use the same copy of mygame.js. A completely fresh install sounds like the best way to go, just to be on the safe side.

---

<div class="post-metadata">

**Author:** ![haqeirah](https://avatars.discourse-cdn.com/v4/letter/h/e47774/32.png) [@haqeirah](https://forum.choiceofgames.com/u/haqeirah)\
**Post date:** [December 31, 2012, 7:07am UTC](https://forum.choiceofgames.com/t/invalid-character/1039/3 "2012-12-31T07:07:17Z")

</div>

I’ve discovered that it’s only the scenes that are effected. I tried unblocking it a few times but get the same problem each time. But if I don’t unblock it, everything works except I can’t add new scenes.

I’m posting my mygame.js file in case anyone can spot any problems with it:

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

nav = new SceneNavigator([  
“startup”  
,“animal”  
,“variables”  
,“gosub”  
,“ending”  
,“death”  
,“test”

]);

// Specify the default starting stats here

stats = {  
gotolabel: “”  
,testing: true  
,bonded: false  
,dname: “unnamed”  
,empathy: 0  
,dtrmnd: 0  
,humour: 0  
,honour: 0  
,honesty: 0  
,eyecolour: “unknown”  
,scep: 0  
,leadership: 50  
,strength: 50  
};

// Specify the stats to use in debug mode

// debugStats = {  
// leadership: 50  
// ,strength: 50  
// };

// or just use defaults  
debugStats = stats

Thanks.

---

<div class="post-metadata">

**Author:** ![haqeirah](https://avatars.discourse-cdn.com/v4/letter/h/e47774/32.png) [@haqeirah](https://forum.choiceofgames.com/u/haqeirah)\
**Post date:** [January 3, 2013, 7:11pm UTC](https://forum.choiceofgames.com/t/invalid-character/1039/4 "2013-01-03T19:11:59Z")

</div>

I’ve solved the invalid character problem but it won’t load the game if the files are unblocked because it says I need to enable javascript. It works ok if I leave the files blocked, but like I said before, I can’t add new scenes. Any ideas about what’s wrong?
