I’ve been trying to create a variable in mygame.js for storing the player name. Every time I try to run the game (which is running locally if that matters?) it says undefined variable. It doesn’t seem to read any attempt to define the variable in that file, but in stats it will read any integer value I set up in there.
I have modified two things, in the startup.txt I added one line at the end of a sentence to call the variable
and in the mygame.js file I added this line outside of nav/stats etc. so its on its own line:
var given_name = “bob”;
I have also tried just
given_name = “bob”;
but that doesn’t work either.
So whenever I launch the index file and it calls given_name it says undefined. Does choicescript require it be defined in a certain location or way to be read by the other files?