# Using A Password

**URL:** <https://forum.choiceofgames.com/t/using-a-password/1664>\
**Category:** ChoiceScript Help\
**Created:** [September 4, 2013, 8:56pm UTC](https://forum.choiceofgames.com/t/using-a-password/1664 "2013-09-04T20:56:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![staubfinger](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@staubfinger](https://forum.choiceofgames.com/u/staubfinger)\
**Post date:** [September 4, 2013, 8:56pm UTC](https://forum.choiceofgames.com/t/using-a-password/1664/1 "2013-09-04T20:56:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![FairyGodfeather](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/fairygodfeather/32/16709_2.png) [@FairyGodfeather](https://forum.choiceofgames.com/u/FairyGodfeather)\
**Post date:** [September 4, 2013, 9:40pm UTC](https://forum.choiceofgames.com/t/using-a-password/1664/2 "2013-09-04T21:40:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![FairyGodfeather](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/fairygodfeather/32/16709_2.png) [@FairyGodfeather](https://forum.choiceofgames.com/u/FairyGodfeather)\
**Post date:** [September 4, 2013, 9:42pm UTC](https://forum.choiceofgames.com/t/using-a-password/1664/3 "2013-09-04T21:42:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![staubfinger](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@staubfinger](https://forum.choiceofgames.com/u/staubfinger)\
**Post date:** [September 4, 2013, 9:56pm UTC](https://forum.choiceofgames.com/t/using-a-password/1664/4 "2013-09-04T21:56:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![FairyGodfeather](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/fairygodfeather/32/16709_2.png) [@FairyGodfeather](https://forum.choiceofgames.com/u/FairyGodfeather)\
**Post date:** [September 4, 2013, 9:59pm UTC](https://forum.choiceofgames.com/t/using-a-password/1664/5 "2013-09-04T21:59:44Z")

</div>

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