Posted 05 April 2016 - 04:56 PM
Hi everyone. I am working on a computer lock program (Not telling the name of it). But its got bugs that i can't fix.
Can you fix them?
I need the program to:
Loop round until a correct password has been inputted.
Automatically start the program after 20 minutes.
Cannot be terminated or rebooted.
Here is the code:
Can you fix them?
I need the program to:
Loop round until a correct password has been inputted.
Automatically start the program after 20 minutes.
Cannot be terminated or rebooted.
Here is the code:
-- Computer Lock
--By FoxData
os.pullEvent = os.pullEventRaw
while true do
term.clear()
term.setCursorPos(10,5)
local password = "changethis"
print("This Machine has been locked")
term.setCursorPos(5,10)
print("Please Enter your password:")
term.setCursorPos(33,10)
local input = read("*")
if input == password then os.reboot()
else
error("Password is wrong")
end
end