# Password

**URL:** <https://forum.kirupa.com/t/password/185380>\
**Category:** Uncategorized\
**Created:** [April 12, 2006, 10:25pm UTC](https://forum.kirupa.com/t/password/185380 "2006-04-12T22:25:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrojas2000](https://avatars.discourse-cdn.com/v4/letter/m/90ced4/32.png) [@mrojas2000](https://forum.kirupa.com/u/mrojas2000)\
**Post date:** [April 12, 2006, 10:25pm UTC](https://forum.kirupa.com/t/password/185380/1 "2006-04-12T22:25:13Z")

</div>

hello everyone… im doing a game, so because the game isnt easy and its long, i decided to set passwords… so i did, i did everything like i had to do it… then i put this code in the button, ans when you press the button without writing anything, it goes to the second level… why??? heres the code:

on(release, keyPress “\<Enter\>”){  
if(pass = “asupu”){  
gotoAndStop(“2”)  
} else if(pass == “tefgh”){  
gotoAndStop(“3”)  
} else if(pass == “gkavc”){  
gotoAndStop(“4”)  
} else if(pass == “kowrt”){  
gotoAndStop(“5”)  
} else if(pass == “jkltr”){  
gotoAndStop(“6”)  
} else if(pass == “oprtd”){  
gotoAndStop(“7”)  
} else if(pass == “oftaw”){  
gotoAndStop(“8”)  
} else if(pass == “oyarf”){  
gotoAndStop(“9”)  
} else if(pass == “zdyig”){  
gotoAndStop(“10”)  
} else if(pass == “xgdty”){  
gotoAndStop(“11”)  
} else if(pass == “gjsog”){  
gotoAndStop(“12”)  
} else if(pass == “sjpwf”){  
gotoAndStop(“13”)  
} else if(pass == “qkrpv”){  
gotoAndStop(“14”)  
} else if(pass == “snfpa”){  
gotoAndStop(“15”)  
} else {  
gotoAndPlay (“wrong\_pass”)  
}  
}

what am i doing wrong??? please help, the game its almost done and i wanna publish it!! thanks…  
ohh btw, if you are going to answer me please i prefer emails… instead of coming everyday checking if i got an answer… [mrojas2000@gmail.com](mailto:mrojas2000@gmail.com) or [mrojas2000@hotmail.com](mailto:mrojas2000@hotmail.com)  
thank you for reading this!!!  
Miguel Rojas

---

<div class="post-metadata">

**Author:** ![nele](https://avatars.discourse-cdn.com/v4/letter/n/838e76/32.png) [@nele](https://forum.kirupa.com/u/nele)\
**Post date:** [April 12, 2006, 10:30pm UTC](https://forum.kirupa.com/t/password/185380/2 "2006-04-12T22:30:54Z")

</div>

we wanna see to!  
👁

---

<div class="post-metadata">

**Author:** ![creatify](https://avatars.discourse-cdn.com/v4/letter/c/d07c76/32.png) [@creatify](https://forum.kirupa.com/u/creatify)\
**Post date:** [April 12, 2006, 10:32pm UTC](https://forum.kirupa.com/t/password/185380/3 "2006-04-12T22:32:48Z")

</div>

In the first if statement - you need a “==” versus a single “=”

on(release, keyPress “\<Enter\>”){  
if(pass [COLOR=“DarkOrange”]==[/COLOR] “asupu”){

---

<div class="post-metadata">

**Author:** ![mrojas2000](https://avatars.discourse-cdn.com/v4/letter/m/90ced4/32.png) [@mrojas2000](https://forum.kirupa.com/u/mrojas2000)\
**Post date:** [April 12, 2006, 10:32pm UTC](https://forum.kirupa.com/t/password/185380/4 "2006-04-12T22:32:58Z")

</div>

huh??

---

<div class="post-metadata">

**Author:** ![mrojas2000](https://avatars.discourse-cdn.com/v4/letter/m/90ced4/32.png) [@mrojas2000](https://forum.kirupa.com/u/mrojas2000)\
**Post date:** [April 12, 2006, 10:35pm UTC](https://forum.kirupa.com/t/password/185380/5 "2006-04-12T22:35:20Z")

</div>

oh crap… why does it needs the 2 ==s anyways  
thanks dude… that worked!!!

---

<div class="post-metadata">

**Author:** ![creatify](https://avatars.discourse-cdn.com/v4/letter/c/d07c76/32.png) [@creatify](https://forum.kirupa.com/u/creatify)\
**Post date:** [April 12, 2006, 10:44pm UTC](https://forum.kirupa.com/t/password/185380/6 "2006-04-12T22:44:03Z")

</div>

using one “=” is setting your variable to equal that string - the strict equality “==” operator is comparing if your variable matches something. glad it worked out!

---

<div class="post-metadata">

**Author:** ![mrojas2000](https://avatars.discourse-cdn.com/v4/letter/m/90ced4/32.png) [@mrojas2000](https://forum.kirupa.com/u/mrojas2000)\
**Post date:** [April 12, 2006, 10:46pm UTC](https://forum.kirupa.com/t/password/185380/7 "2006-04-12T22:46:07Z")

</div>

thanks for everything – help, fast answer, and information
