Posted 16 November 2014 - 05:51 PM
Just made this code
So, the porpuse is to be a normal door lock but it doesn't work when it has a redstone signal from the left.
But it dosen't work! Why?
local side = "left"
local password = "bacon"
local opentime = 5
while true do
term.clear()
term.setCursorPos(1,1)
write("Password: ")
local input = read("*")
if input == password then
term.clear()
term.setCursorPos(1,1)
print("Password correct!")
rs.setOutput(side,true)
sleep(opentime)
rs.setOutput(side,false)
elseif redstone.getInput ("left") then
print("Terminal Blocked")
sleep (3)
else
print ("Password Incorrect")
sleep(2)
end
end
So, the porpuse is to be a normal door lock but it doesn't work when it has a redstone signal from the left.
But it dosen't work! Why?