Posted 05 August 2013 - 06:53 PM
i need help with my code and how to fix it from another computer incase it fails and i cant enter the bypass code (Eg: program loops and you cant ente]r anything in with out it rebooting every tick -_-/>)
here is the current code i have
current problem when i enter the password nothing happens when i enter the bypass code (adminpw) it grants access but does whats under else and it locks out and wont open door HALP
here is the current code i have
Spoiler
os.pullEvent = os.pullEventRaw
local adminpw
local side = "left"
local password = "creeper"
local opentime = 5
while true do
term.clear()
term.setCursorPos(1,1)
write("Access Code Or Admin")
local input = read("*")
if input == password then
term.clear()
term.setCursorPos(1,1)
textutils.slowPrint("Access Granted")
rs.setOutput(side,true)
sleep(opentime)
rs.setOutput(side,false)
else
term.clear()
term.setCursorPos(1,1)
textutils.slowPrint("Access Denied Activating Alarm Systems!")
textutils.slowPrint("System Timeout Retry in 60 seconds")
sleep(60)
os.reboot
if input == adminpw then
term.clear()
term.setCursorPos(1,1)
textutils.slowPrint("Access Code Bypassed")
os.pullEvent = pullEvent
end
end
current problem when i enter the password nothing happens when i enter the bypass code (adminpw) it grants access but does whats under else and it locks out and wont open door HALP