Posted 22 April 2012 - 12:48 AM
So this is my first program. A door lock.
The problem is when I start up the terminal it says: bios:206: [string "startup"]:19: '=' expected
local password = "password"
local debug = "debugger"
term.clear()
term.setCursorPos(1,1)
write("Password: ")
local input = read("*")
if input == (password) then
term.clear()
term.setCursorPos(1,1)
print("Good idea!")
rs.setOutput("right", true)
sleep(4)
rs.setOutput("right", false)
os.reboot()
elseif input == debug then
exit()
else
term.clear()
term.setCursorPos(1,1)
print("Incorrect password!")
sleep(2)
os.reboot()
Does anyone know what I need to change?
The problem is when I start up the terminal it says: bios:206: [string "startup"]:19: '=' expected
local password = "password"
local debug = "debugger"
term.clear()
term.setCursorPos(1,1)
write("Password: ")
local input = read("*")
if input == (password) then
term.clear()
term.setCursorPos(1,1)
print("Good idea!")
rs.setOutput("right", true)
sleep(4)
rs.setOutput("right", false)
os.reboot()
elseif input == debug then
exit()
else
term.clear()
term.setCursorPos(1,1)
print("Incorrect password!")
sleep(2)
os.reboot()
Does anyone know what I need to change?