• Reading files
    1 replies, posted
Is it possible to read the first line of a file and pull code from it? For example, I want to pull [lua]ZerK[/lua] from [lua]Player: ZerK[/lua] If it's not possible to do that, how can I just pull the first line?
Do a string Explode \n Then you'll have a table where each index corresponds to the line. So output[ 1 ] is line 1 To get Zerk from Player: Zerk, you can do several different things. You can try pattern matching, you can do a string.sub where you start from the 8th character and go until string.len( output[ 1 ] ), you could string.gsub and remove "Player: ", etc...
Sorry, you need to Log In to post a reply to this thread.