Board Thread:Tutorials/@comment-204.111.116.168-20121219002221/@comment-15959108-20140514211424

Whenever I attempt to use my program it simply executes the entire thing, can anyone suggest improvements to:

os.pullEvent = os.pullEventRaw

term.clear

term.setCursorPos(1, 1)

username = {"user1", "user2", "user3"}

password = {"pass1", "pass2", "pass3"}

write("Username: ")

user = read

write("Password: ")

pass = read('*')

for i=1, #username do -- Starts a loop

if user == username[i] and pass == password[i] then

access = true

end

end

if access == true then

print("Logging in...")

sleep(1)

print("Welcome "..user)

else

print("Incorrect username and password combination")

sleep(2)

os.reboot

end