Posted 25 June 2014 - 05:03 PM
Hey guys,
I wanted to make a keyword-protected door. The first keyword should emit redstone at the backside… the second on the right. It works perfectly but there is one thing that I couldn't do:
My Code:
As I sad before: works perfectly.
Now I want to something that says:
- Put in keyword here:
or:
- Keyword?
I tried it out yesterday and I don't know how I did it exactly.
So the program ran. It even emitted redstone but it said Keyword first when I had put the Keyword in. It looked like this:
password2
Keyword? Door opening…
Can you help me?
Thanks.
I wanted to make a keyword-protected door. The first keyword should emit redstone at the backside… the second on the right. It works perfectly but there is one thing that I couldn't do:
My Code:
correctpass = ("password1")
correctpass2 = ("password2")
pass = read()
if correctpass == pass then
redstone.setOutput("back",true)
print("Keyword correct!")
sleep(3)
redstone.setOutput("back",false)
os.shutdown()
end
if correctpass2 == pass then
redstone.setOutput("right",true)
print("Put a senseless sentence here, which is not sentence one")
sleep(3)
redstone.setOutput("right",false)
os.shutdown()
else
print("Invalid Keyword")
sleep(3)
os.shutdown()
end
As I sad before: works perfectly.
Now I want to something that says:
- Put in keyword here:
or:
- Keyword?
I tried it out yesterday and I don't know how I did it exactly.
So the program ran. It even emitted redstone but it said Keyword first when I had put the Keyword in. It looked like this:
password2
Keyword? Door opening…
Can you help me?
Thanks.