This is most likely the most stupid thing anyone has ever asked on here, but here’s my question:
I was looking through the forums for a way to set a name for your character with a text box, and most methods said something about needing to use mygame.js . I’ve tried to open up mygame.js before, but it always comes up with the same error message:
Line: 1
Char: 1
Error: ‘SceneNavigator’ is undefined
Code: 800A1391
Source: Microsoft JScript runtime error
Every topic I looked into about this was someone asking, another person telling them to install Notepad++, and then it worked. I’ve tried installing Notepad++, but the file still won’t open.
For some reason, when I try to be sneaky and drag the mygame.js file into a new Notepad++ file, it shows up as just this:
nav = new SceneNavigator([“startup”]);
stats = {};
and that’s it. From what I’ve seen, there should be lots more in the file than just that, and I’m scared to try to edit it without knowing if this should be happening or not.
In the end, I’m left with a few questions:
How do I get it to work?
If it’s already working, then why is it different?
Also, in regards to the naming thing, do you need to use mygame.js for it, or is there a way to just use scenes (startup, I imagine) to do it? Thanks!
And no, you shouldn’t need to set a variable again (unless it’s changed). To display a variable like “name” so the reader sees what it’s been set to, use:
I’d suggest using an unaltered version of mygame.js. Download choicescript again (or just grab a new copy of that file). Just in case it messes stuff up.
If you haven’t already I’d suggest reading the code of some of the existing games. I found it helped me get a feel for how they do things.