Posted 30 November 2012 - 07:53 PM
How can I make lines 4 through 13 repeat until they enter the correct password?
os.pullEvent = os.pullEventRaw
print ("Door Status: Lock engaged")
print ("Enter Password")
write("Password:")
UserInput = io.read()
if UserInput == "Alpha" then
print ("Door lock disengaged")
rs.setOutput ("right", true )
sleep(5)
rs.setOutput ("right" , false )
os.shutdown()
else
print ("Password incorrect, try again")