Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function inLogin(login, nick)
- local check_login = 0
- for _, v in ipairs(login) do
- if v == nick then
- check_login = check_login + 1
- end
- end
- if check_login > 0 then
- return true
- else
- return false
- end
- end
- --------------------------------------------
- local login ={"teste", "teste2"}
- print(inLogin(login, 'teste'))
- print(inLogin(login, 'outro_login'))
- if inLogin(login, "teste") then
- print("Login Valido")
- else
- print("Login Invalido")
- end
- if inLogin(login, "outro_login") then
- print("Login Valido")
- else
- print("Login Invalido")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement