So I’m pretty new to choicescript and coding in general, and I’m having some trouble with creating string variables. Boolean and numerical ones are fine, but the problem arises whenever I use quotation/speech marks ("" or ‘’).
I don’t know what text editor is the best to use for a Macbook Air, but I’m currently doing all my writing in OpenOffice. However, every time I try to test the game (in Firefox), I get this error:
startup line 7: Invalid expression, couldn’t extract another token: “name”
My code looks like this:
*title My First ChoiceScript Game
*author Anonymous
*scene_list
startup
*create name “Hero”
I tried to run startup.txt through Firefox (just while playing around with coding etc.) and found that my speech marks were substituted like this:
“Heroâ€
Has anyone else had this problem? And does anyone know how to fix it? Cheers
Most “word processors” use special non-standard characters for quotes and the like. You’ll be better off with a general text editor (such as atom, vs code or sublime) or one of the CS community tools (CSIDE or Chronicler).
I’d recommend using text editor rather word processor.
OpenOffice (and MsOffice for Windows counterpart) are word processors, while I believe Macbook has Notebook as their text editor (Notepad is Windows counterpart).
Other than that, check out the link shown by @CJW.
As everyone has said, I’d recommend switching to a text editor, but if you want to keep using OpenOffice, it’s easy enough to do periodic find-and-replace-alls (“ and ” to ", ‘ to ')
Pretty much what everyone else said. A little tip though is that you only have to worry about using " " as opposed to “” when doing stats or other commands. They work themselves out when it isn’t applied to that.
Just find where " is and use it until you form the habit.