I’m trying a very simple thing : make the player/reader choose the name of the hero.
So here’s what I have :
*temp name
Enter your name!
*input_text name
*goto your_name_is
*label your_name_is
Your name is ${name}!
*finish
Very simple. But I always get an error message who says “Javascript {}” when I click on “Next”. Then, after the error message, on the page, everything’s fine, with the name, etc. But this error message is driving me reaaaally crazy
Is there a problem with the variable ? Where am I suppose to define it ?
I am not at my main PC to check the files of my game, but I think the issue is that you are defining the variable name. It may be part of ChoiceScript. Drop *temp name and see if it works.
I tried, but when I do it, I still get the error message AND it don’t go to the next “page” (where the sentence “Your name is…” is supposed to be). So it’s a step back.
Thanks for helping
Beats me – your code works fine when I run it in my game. If you’ve got “name” as a variable in your mygame file, you shouldn’t need to also make it a temp variable, but that doesn’t break the game when I do it. What browser are you using?
Is it possible you can check the game on Windows? The error messages don’t work correctly on any browser other than Internet Explorer (as far as I know). The actual error message may help diagnose the problem.
I’ll try on Windows. But it will be very weird if the game work on Windows but does not on a Mac.
I tried on firefox, but I still get the error message.
I meant to ask if you can try it on Internet Explorer (my mistake).
I’m not saying that it will work on Windows, just that the error message only displays correctly on Internet Explorer. On any other browser it just seems to shows a pair of curly parenthesis (like you mentioned) while on IE it actually displays the error message as intended. (Again, as far as I know, that’s how it works.)