Posted 28 October 2014 - 08:49 PM
Hey guys I have been having problems with my doorlock code it says
BlockDefender 3.1Loading Program.bios:145: attempt to call nil
> bios :257: attempt to call nil
Goodbye
bios:145: attempt to call nil
Code: os.pullEvent = os.pullEventraw
local password = "derp69"
local doorside = "right"
local opentime = 3
local loadtime = 1
while true do
term.clear()
term.setCursorPos(1,1)
write "BlockDefender 3.1"
write "Loading Program."
sleep (loadtime)
write "Loading Program.."
sleep (loadtime)
write "Loading Program…"
sleep (loadtime)
write "Loading Program."
sleep (loadtime)
write "Password: "
local input = read ("*")
if input == password then
term.clear()
term.setCursorPos (1,1)
write "Logging in."
sleep (loadtime)
write "Logging in.."
sleep (loadtime)
write "Logging in…"
sleep (loadtime)
write "Logging in."
sleep (loadtime)
write "Login Accepted."
rs.setOutput (doorside,true)
sleep (opentime)
rs.setOutput (doorside,false)
os.shutdown()
else
term.clear()
term.setCursor (1,1)
write "Logging in."
sleep (loadtime)
write "Logging in.."
sleep (loadtime)
write "Logging in…"
sleep (loadtime)
write "Logging in."
sleep (loadtime)
write "Login Failed. Try again."
sleep(3)
end
end
BlockDefender 3.1Loading Program.bios:145: attempt to call nil
> bios :257: attempt to call nil
Goodbye
bios:145: attempt to call nil
Code: os.pullEvent = os.pullEventraw
local password = "derp69"
local doorside = "right"
local opentime = 3
local loadtime = 1
while true do
term.clear()
term.setCursorPos(1,1)
write "BlockDefender 3.1"
write "Loading Program."
sleep (loadtime)
write "Loading Program.."
sleep (loadtime)
write "Loading Program…"
sleep (loadtime)
write "Loading Program."
sleep (loadtime)
write "Password: "
local input = read ("*")
if input == password then
term.clear()
term.setCursorPos (1,1)
write "Logging in."
sleep (loadtime)
write "Logging in.."
sleep (loadtime)
write "Logging in…"
sleep (loadtime)
write "Logging in."
sleep (loadtime)
write "Login Accepted."
rs.setOutput (doorside,true)
sleep (opentime)
rs.setOutput (doorside,false)
os.shutdown()
else
term.clear()
term.setCursor (1,1)
write "Logging in."
sleep (loadtime)
write "Logging in.."
sleep (loadtime)
write "Logging in…"
sleep (loadtime)
write "Logging in."
sleep (loadtime)
write "Login Failed. Try again."
sleep(3)
end
end