I’m trying to insert a name variable, with the code
*create Name "Unknown"
For the user to select their name later on. However, when I put this, it says “Invalid Expression; Can’t extract another token”. So I take out the quotation marks and it says it need to be a quoted string. Assistance please?
Where did you put this? Is it in your startup.txt? The *create command is only valid in startup.txt (although you can use *temp in other scenes, but the *temp variable is reset if you leave that scene).
Also it’s generally encouraged to use lowercase for all variables, because variables are case sensitive. It’s easy enough to *create Name "Unknown" and then, later, type *set name "Audrey" or ${name}, which would return an error.
Just to show you an example… this is the beginning of my story, which works fine. Do you have the title, author, and scene list at the beginning? Followed by the *create variables? Also, do try Fiogan’s suggestion- copy/pasting from an old word processor document into notepad could cause trouble such as the curly parens Fiogan mentions.
*title My First ChoiceScript Game
*author Guess who. It me.
*scene_list
startup
animal
variables
gosub
ending
death
*create Name "Unknown"
*create Leadership 50
*create Strength 50
*create Honesty 50
Welcome to your very first ChoiceScript game!