Posted 15 May 2013 - 12:49 AM
When I run my program it gives me the error io:5: unsuported format after I enter the username can some one help?
-- var
local Usern = 0
local Passw = 0
local iUsern = 0
local iPassw = 0
USER = 0
-- table
local UN = {"greenwolf","aim","potassium"}
local PW = {"test","~","~"}
-- function
function UserC()
for i = 1,3 do
if UN[i] == iUsern then
Usern = i
end
end
end
function PassC()
if PW[Usern] == iPassw and PW[Usern] ~= "~" then
print("Welcome "..UN[Usern])
else
print("*Error* Wrong Password")
sleep(1)
print("Rebooting")
reboot()
end
end
-- codecls
write ("Login: ")
iUsern = io.read()
UserC()
write ("Password: ")
iPassw = io.read("*")
PassC()
USER = Usern