Posted 10 July 2013 - 03:59 PM
Tite: OS Error
I cant find where i have put wrong here:
pass = "BaseSecret"
welcomeMsg = "Enter Security Code:"
successMsg = "Acces Granted"
failedMsg = "Acces Denied"
doorDelay = 2
coolDown = 5 –time beteewn fails
doorDir = "back"
term.clear()
term.setCursorPos(1,1)
print(welcomeMsg)
input = read("*")
if input == pass then
print(successMsg)
redstone.setOutput(doorDir,true)
sleep(doorDelay)
redstone.setOutput(doorDir,false)
sleep(doorDelay)
redstone.setOutput(DoorDir,true)
sleep(doorDelay)
redstone.setOutput(doorDir,false)
sleep(doorDelay)
redstone.setOutput(doorDir,true)
sleep(doorDelay)
redstone.setOutput(doorDir,false)
sleep(doorDelay)
redstone.setOutput(doorDir,true)
sleep(doorDelay)
redstone.setOutput(doorDir,false)
sleep(doorDelay)
redstone.setOutput(doorDir,true)
sleep(doorDelay)
redstone.setOutput(doorDir,false)
sleep(doorDelay)
redstone.setOutput(doorDir,true)
sleep(doorDelay)
redstone.setOutput(doorDir,false)
os.shutdown()
else
print(failedMsg)
sleep(coolDown)
os.shutdown()
I cant find where i have put wrong here:
pass = "BaseSecret"
welcomeMsg = "Enter Security Code:"
successMsg = "Acces Granted"
failedMsg = "Acces Denied"
doorDelay = 2
coolDown = 5 –time beteewn fails
doorDir = "back"
term.clear()
term.setCursorPos(1,1)
print(welcomeMsg)
input = read("*")
if input == pass then
print(successMsg)
redstone.setOutput(doorDir,true)
sleep(doorDelay)
redstone.setOutput(doorDir,false)
sleep(doorDelay)
redstone.setOutput(DoorDir,true)
sleep(doorDelay)
redstone.setOutput(doorDir,false)
sleep(doorDelay)
redstone.setOutput(doorDir,true)
sleep(doorDelay)
redstone.setOutput(doorDir,false)
sleep(doorDelay)
redstone.setOutput(doorDir,true)
sleep(doorDelay)
redstone.setOutput(doorDir,false)
sleep(doorDelay)
redstone.setOutput(doorDir,true)
sleep(doorDelay)
redstone.setOutput(doorDir,false)
sleep(doorDelay)
redstone.setOutput(doorDir,true)
sleep(doorDelay)
redstone.setOutput(doorDir,false)
os.shutdown()
else
print(failedMsg)
sleep(coolDown)
os.shutdown()