Posted 03 April 2012 - 03:17 PM
need help in my programming what i want it to do is turn on lights (left) and open a door (right) using password lock then needing another password to open another door all on one computer
this is what i have written
print("systerm online")
term.clear()
term.setCursorPos(1,1)
password = "BattleSeure"
debug ="12345"
pass = "12345"
print ("security systerm")
write ("password required: ")
input = read()
term.clear()
term.setCursorPos(1,1)
if input == password then
print ("access granted")
redstone.setOutput ("right", true)
print ("lights online")
sleep(2)
redstone.setOutput ("left", true)
print ("door open")
sleep (5)
redstone.setOutput("left",false)
print ("Safe security")
write "password required: "
input = read()
if input == passthen
print ("safe access granted")
redstone.setOutput ("back",true)
sleep(2)
redstone.setOutput ("right", false)
os.shutdown()
elseif
input == debug then
exit()
else
print("password incorrect!")
sleep(5)
os.shutdown()
end
this is my first time i used other people programs to make this so not all of it was mine it may be miner issues or rookie mistakes thanks for any help
this is what i have written
print("systerm online")
term.clear()
term.setCursorPos(1,1)
password = "BattleSeure"
debug ="12345"
pass = "12345"
print ("security systerm")
write ("password required: ")
input = read()
term.clear()
term.setCursorPos(1,1)
if input == password then
print ("access granted")
redstone.setOutput ("right", true)
print ("lights online")
sleep(2)
redstone.setOutput ("left", true)
print ("door open")
sleep (5)
redstone.setOutput("left",false)
print ("Safe security")
write "password required: "
input = read()
if input == passthen
print ("safe access granted")
redstone.setOutput ("back",true)
sleep(2)
redstone.setOutput ("right", false)
os.shutdown()
elseif
input == debug then
exit()
else
print("password incorrect!")
sleep(5)
os.shutdown()
end
this is my first time i used other people programs to make this so not all of it was mine it may be miner issues or rookie mistakes thanks for any help