Posted 30 March 2016 - 01:26 PM
hi, i need help making my computer controlled door.
the source code is the following:
while true do
term.clear()
term.setCursorPos(1,1)
write("Password: ")
local input = read("*")
if input == asdf then
term.clear()
term.setCursorPos(1,1)
print("Password correct!")
rs.setOutput(back,true)
sleep(15)
rs.setOutput(back,false)
else
print("Password incorrect! :(/> yow will be able to enter the password after 10 seconds")
sleep(10)
end
end
note: adsf is yust for testing, it's not my real password
anyone who knows lua programming, can you help?!?!?????????????
if i input asdf, it says it's incorrect. and when i input anything else, it says it's incorrect, anyway. so it's kinda working except for this bug which renders it useless….
the code is a modified version of the original: http://computercraft.info/wiki/Making_a_Password_Protected_Door