Keypad script problem

I can't figure out why the script doesn't work. I used the script from this website:
I did the same thing as the second picture has, and I get this error: "Error running script: Error compiling expression 'result=1594': Unknown object or variable 'result'"
Image of my problem:
Be nice, I'm new :)

If it's saying result is unknown, you likely missed out the "get input" step.

Also, looking at that error message makes me think that you have some quotes missing. A result entered by the player will always be a string, and you can't compare strings to numbers. So your expression will need to be result="1594", not result=1594.

Thanks! Both things are missing, so I will add those right away.

I get this error now. What is wrong now?

use keypad
Please enter password:

I don't understand your command.

msg ("Please enter password:")
get input {
if ( result="1594") {
UnlockExit (safe room)
else {
msg ("Incorrect code. Please try again.")

Log in to post a reply.