Posted 08 September 2014 - 09:30 AM
Hi Guys!
I'm really new to ComputerCraft, and I mainly use it just for locking doors. Can someone tell me why this code isn't working? I've looked through it, and I just don't see any problems with it.
Thanks in advance!
I'm really new to ComputerCraft, and I mainly use it just for locking doors. Can someone tell me why this code isn't working? I've looked through it, and I just don't see any problems with it.
local oldPull = os.pullEvent;
os.pullEvent = os.pullEventRaw;
term.clear()
term.setCursorPos(1,1)
correctpass = "Home"
write("Key?")
pass = read("*")
if pass == (correctpass) then
write("Welcome Home")
redstone.setOutput("right", true )
sleep (3)
redstone.setOutput("right", false )
os.shutdown()
end
write("Wrong Key")
sleep (3)
term.clear()
term.setCursorPos(1,1)
textutils.slowPrint("Locking Door")
sleep (3)
os.shutdown()
os.pullEvent = oldPull;
Thanks in advance!