Posted 12 April 2013 - 02:49 AM
Im not very familar with lua, but i made a small code for a password protected door (actually, i copied the code from a tutoral and added pcall() to prevent strg+T
However, everytime i enter the password, it is incorrect.
And when i try to put up os.pullEvent = os.pullEventRaw, it just writes a java error.
Anyone who can help me?
However, everytime i enter the password, it is incorrect.
correctpass = "test"
write("enter Password:")
pass = pcall(read)
if pass == (correctpass) then
write("Correct, you may enter")
redstone.setOutput("bottom", true)
pcall(sleep,4)
os.shutdown()
else
write("Incorrect")
pcall(sleep,2)
os.shutdown()
end
And when i try to put up os.pullEvent = os.pullEventRaw, it just writes a java error.
Anyone who can help me?