Posted 20 June 2012 - 01:18 AM
term.clear()
term.setCursorPos(1, 1)
debug = "debug"
password = "justice"
guest = "guest"
sp = textutils.slowPrint
write("Name: ")
name = read()
sp ("Welcome tot Justice "..name.."!")
sp("Please enter your autherization ID.")
sp("If you are new, please type guest.")
write("Auth. ID: ")
input = ("*")
term.clear()
term.setCursorPos(1, 1)
if input == password then
sp("Authenticating. . .")
sp("Welcome back! Please proceed in.")
rs.setOutput("right", true)
sleep(4)
rs.setOutput("right", false)
sleep(4)
rs.setOutput("back", true)
sleep(3)
os.shutdown()
elseif input == guest then
sp("Welcome.")
rs.setOutput("right", true)
sleep(4)
rs.setOutput("right", false)
os.shutdown()
elseif input == theworld then
rs.setOutput("right", true)
sleep(4)
rs.setOutput("right", false)
exit()
else
sp("Nope.")
os.shutdown()
end
I get bios:25: bad argument: double expected, got nil
term.setCursorPos(1, 1)
debug = "debug"
password = "justice"
guest = "guest"
sp = textutils.slowPrint
write("Name: ")
name = read()
sp ("Welcome tot Justice "..name.."!")
sp("Please enter your autherization ID.")
sp("If you are new, please type guest.")
write("Auth. ID: ")
input = ("*")
term.clear()
term.setCursorPos(1, 1)
if input == password then
sp("Authenticating. . .")
sp("Welcome back! Please proceed in.")
rs.setOutput("right", true)
sleep(4)
rs.setOutput("right", false)
sleep(4)
rs.setOutput("back", true)
sleep(3)
os.shutdown()
elseif input == guest then
sp("Welcome.")
rs.setOutput("right", true)
sleep(4)
rs.setOutput("right", false)
os.shutdown()
elseif input == theworld then
rs.setOutput("right", true)
sleep(4)
rs.setOutput("right", false)
exit()
else
sp("Nope.")
os.shutdown()
end
I get bios:25: bad argument: double expected, got nil