Posted 20 May 2017 - 11:43 PM
So im making a program that password protects pocket computer, so it checks if the password is 'MasterKey', and if its not, it checks if it is 'password1', and if not, it reboots.
Im getting and EOF error on line 11, can someone help me?
(Not sure how to do spoiler)
Code:
os.pullEvent = os.pullEventRaw
while true do
term.clear()
term.setCursorPos(1,1)
term.write("Password:")
local password = read()
if password == "MasterKey" then
shell.run("ID")
end
end
elseif password == "password1" then
shell.run("ID")
end
end
else
term.print("Incorrect.Rebooting")
sleep(5)
os.reboot
end
end
end
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
can someone fix my code and help me? i've been tinkering with it for like an hour now
Im getting and EOF error on line 11, can someone help me?
(Not sure how to do spoiler)
Code:
os.pullEvent = os.pullEventRaw
while true do
term.clear()
term.setCursorPos(1,1)
term.write("Password:")
local password = read()
if password == "MasterKey" then
shell.run("ID")
end
end
elseif password == "password1" then
shell.run("ID")
end
end
else
term.print("Incorrect.Rebooting")
sleep(5)
os.reboot
end
end
end
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
can someone fix my code and help me? i've been tinkering with it for like an hour now