I’m trying to set up a way to play through my game while making information that’s normally “behind-the-scenes” visible. To do this, I set up a variable called password and this is the code where I’m trying to call it (using “%” to make indents):
*title Abyss 0.1.0
*scene_list
%%startup
%%setup
%%ending
*create impossible 0
*create memory 0
*create dog “Santo”
*create strength 0
*create charisma 0
*create intelligence 0
*create hotheaded 50
*create suspicious 50
*create defined 0
*create password “password”
*label beginning
This is Abyss, blah blah blah.
*choice
%%#Begin
%%*finish
%%#Password
%%%%What’s the password?
%%%%*input_text password
%%%%*if password = “debug”
%%%%%%*set impossible = 1
%%%%%%Right.
%%%%*else
%%%%%%Sorry, that’s wrong.
%%%%*page_break
%%%%*gosub beginning
It works exactly how I want it… if the wrong password is typed in. If the player, however, types “debug”, I get this error:
line 27: Invalid expression at char 2, expected NUMBER, STRING, VAR or PARENTHETICAL, was: EQUALITY [=]
Any clues? This is my first attempt working with ChoiceScript, I’m not super comfortable with it yet.