Posted 25 July 2012 - 12:05 PM
Making a login program with a built in number of tries (3) until it reboots the system.
Not quite a finished product, mainly because of this error.
I would take any suggestions on improving anything that's there.
When I go to run the program(both through start-up[Part of the start-up program] & manual).
I get this error message.
bios:206: [string "login"]:14: '=' expected
Not sure how to fix the error because I'm not sure what it is talking about.
Any help or suggestions would be much appreciated.
Thank you.
—–
Improved Code:
http://pastebin.com/wdkHjkA2
Not quite a finished product, mainly because of this error.
I would take any suggestions on improving anything that's there.
When I go to run the program(both through start-up[Part of the start-up program] & manual).
I get this error message.
bios:206: [string "login"]:14: '=' expected
Not sure how to fix the error because I'm not sure what it is talking about.
os.pullEvent = os.pullEventRaw
--Intialization --
do
tries = 1
triesmax = 3
end
-- Main Loop --
while true do
if tries > triesmax then
os.reboot
else
if tries < triesmax then
term.clear()
term.setCursorPos(1,1)
textutils.slowPrint("Zyph Computer Security V:1.0")
textutils.slowPrint("========================")
print(" ")
sleep(0.75)
print("UserName: ")
sleep(1.125)
term.setCursorPos(11,4)
textutils.slowPrint("Zyphloyd")
sleep(0.75)
write("Password: ")
sleep(0.75)
function pass()
t = io.read()
if t == "Space101" then
print ("Access Granted.")
sleep(1)
Term.setCursorPos(1,1)
term.clear()
shell.run("hello")
sleep(1.5)
term clear()
term.setCursorPos(1,1)
print(" ")
print("Incorrect Login information.")
sleep(1)
term.clear()
term.setCursorPos(1,1)
print("Zyph Computer Security V:1.0")
print("========================")
print(" ")
print("Username: Zyphloyd")
write("Password: ")
pass()
end
end
pass()
Any help or suggestions would be much appreciated.
Thank you.
—–
Improved Code:
http://pastebin.com/wdkHjkA2