Posted 07 November 2012 - 03:15 AM
Alright, I've tried to solve this, but it's very weird to me. I've edited the program startup (when the computer turns on) with this bit of code to password protect my computer:
The weird part is, if I shutdown my computer, then right-click it again, the computer acts as if nothing is wrong. But when I reboot it, I get the error: "reboot:3: attempt to call nil". what do I do?
pullEvent = os.pullEvent
os.pullEvent = os.pullEventRaw -- denies control+T
function clear()
term.clear()
term.setCursorPos(1,1)
end
local password, correct = "", "password"
while password ~= correct do
clear()
print("Please Enter Password.")
term.setCursorPos(1,2)
print("-----------------------------")
term.setCursorPos(1,3)
password = read("*")
if password == correct then
term.setCursorPos(1,1)
term.clearLine()
print("Access Granted")
sleep(1)
clear()
else
term.setCursorPos(1,1)
term.clearLine()
print("Incorrect Password.")
sleep(1)
term.setCursorPos(1,3)
term.clearLine()
end
end
os.pullEvent = pullEvent
The weird part is, if I shutdown my computer, then right-click it again, the computer acts as if nothing is wrong. But when I reboot it, I get the error: "reboot:3: attempt to call nil". what do I do?