28.07.2011, 21:57
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:
Then I would use this in sscanf to split it into the specified varibles using the : delimiter:
Does that make sense? See the sscanf documentation for more information, it is all clearly explained there.
pawn Код:
JaTochNietDan:26:12:passwordhash
pawn Код:
sscanf(string, "p<:>s[24]dds[50]", Username, integer, integer2, password_hash);