Error message, can't figure it out


#1

I downloaded the latest ChoiceScript version from github but when I run the game now through my browser locally, I get an error:
‘rootDir’ is undefined.

I tried in IE and Firefox and receive the same error. Anyone experience this before or know how to fix it?


#2

Sorry, never encountered that one. Is that a brand new version? If so, it might be a bug (in which case, thanks for the warning).


#3

Did you rename mygame.js? If so, you will need to edit index.html as well. Alternatively, it could be a problem with the actual name of the choicescript directory (either because you are using old files in a new directory or because of an error from choicescript as they updated the files). Either way, it sounds like a filing problem rather than anything to do with your code.

Edit: I just re-read your post and I guess it could be the shortcut you use to load the game. That probably needs updating as the file name will have changed.


#4

Try re-downloading it, then running it without any editing (ie, running the preloaded game). Do you still get the same error?


#5

Dan from CoG helped me out. I was using the same index.html from an old version, and RootDir is declared in the newest ChoiceScript index.html. So Reaperoad was on the right track.

If anyone downloads the newest ChoiceScript, scenes can be copied over but everything else needs to be recreated – meaning, cut and post text from old to new but leave the code the same.

Thanks for the replies!