How do you correctly readLine() ??
I'm making a login for my OS and it has a file that has the username and password on it.
There is a Username and Password on the one file.
How do I get it to read where it says User = "" and pass = "" ?
readLine ?
Started by Noodle, Apr 11 2012 01:52 AM
1 reply to this topic
#1
Posted 11 April 2012 - 01:52 AM
#2
Posted 11 April 2012 - 02:00 AM
Probably the best way to match them up would be to read the contents on each file into a string, then split the string and covert it into a table then run a check like..
You will have to do this for each line in the table. You can do table.maxn(tablename) to get the count and do a for loop like..
if username == userfile[x] then do stuff end
You will have to do this for each line in the table. You can do table.maxn(tablename) to get the count and do a for loop like..
local a = table.maxn(userfile) for x=1, a do if username == userfile[x] then do stuff end end
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











