Using A Password

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

*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.
%%%%What’s the password?
%%%%*input_text password
%%%%*if password = “debug”
%%%%%%*set impossible = 1
%%%%%%Sorry, that’s wrong.
%%%%*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.

You can use

< pre> Code here
and here < /pre>

(With no spaces between the < and the pre> or /pre> to display code on the forums.

Don’t set something = just *set password “debug”

Ah, wonderful. It wasn’t *set password but *set impossible that I had wrong. Nevertheless, thank you so much. It works well now.

That’s great. And yeah I meant impossible but my fingers typed password, and that’s how bugs occur. :slight_smile: