sscanf
#1

hello everyone,

i use sscanf instead of format but this keeps giving me errors in the conslole
pawn Код:
{
                new string[128];
                sscanf(string, "s[128]ii", "ERROR: Your new password must be between %i and %i characters long!", gSettings[PASS_MIN], gSettings[PASS_MAX]);//error
                return SendClientMessage(playerid, COLOR_ORANGE, string);
            }
            gPlayerInfo[playerid][PLAYER_PASS] = buf2;
            new string[256];
            sscanf(string, "s[256]s[30]s[30]", "You have successfully changed your password from \'%s\' to \'%s\'.", tmp, tmp2);//error
            return SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
        }
        else
            return SendClientMessage(playerid, COLOR_ORANGE, "ERROR: Incorrect password.");
    }
i hope anyone can help me,
the problem or the sscanf lines only are good enough

thanks in advance,

Sansko.
Reply
#2

Sscanf doesn't work like that. You will need to use format to put values into strings. Sscanf splits strings and turns them to values.
Reply
#3

oh ok, i thought you could put values in strings with it too

thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)