sscanf noob question
#3

Gh0sts explanation was 100% accurate, it was backwords. sscanf is for unformatting strings, not formatting them. Although he was correct that p<|> means that the delimiter for splitting the string up is the | character. So for example if I have a string that is the following:

pawn Код:
JaTochNietDan:26:12:passwordhash
Then I would use this in sscanf to split it into the specified varibles using the : delimiter:

pawn Код:
sscanf(string, "p<:>s[24]dds[50]", Username, integer, integer2, password_hash);
Does that make sense? See the sscanf documentation for more information, it is all clearly explained there.
Reply


Messages In This Thread
sscanf noob question - by TheArcher - 28.07.2011, 21:49
Re: sscanf noob question - by Gh0sT_ - 28.07.2011, 21:52
Re: sscanf noob question - by JaTochNietDan - 28.07.2011, 21:57
Re: sscanf noob question - by TheArcher - 28.07.2011, 22:05

Forum Jump:


Users browsing this thread: 1 Guest(s)