Posted 06 March 2013 - 07:56 PM
Well if I type login("username1", "password1") it returns false when it should return true.
Here is the function code
Here is the function code
function login(arg1, arg2)
local arg1, arg2 = nil
local user = { "username1" }
local pass = { "password1" }
if app.debug == true then
for i, v in ipairs(user) do
if arg1 == v then
local valid = true
local password = pass[i]
break
else
return false
end
end
if arg2 == password then
return true
else
return false
end
end
end