ID:146394
 
Code:
            Enter(atom/movable/A)
if(ismob(A))
var/mob/M = A
var/pass = input(M,"What's the password?","Password") as text
if(pass)
if(findtext(password,"M"))
M.loc = src
step(M,M.dir)
else
usr << "Wrong password!"


Problem description:

I'm creating a riddle game where you need to figure out the answer to the door and enter it to progress, but im having a small problem with the doors...They accept anything, even if it doesnt contain the defined word/letter. Here is the coding to one of my doors.
Use return 1 to let them in to the door, and return 0 to not let then.
In response to Sniper Joe
Doh, thanks Sniper Joe
You shouldn't be using usr << "Wrong password", instead use M.
Its bad coding habits >_>.
Yes. If an NPC or an obj moved into it it'd runtime error you.

For more information:

usr Unfriendly
In response to DeathAwaitsU
Ah. I understand. Thanks