warning 202: number of arguments does not match definition
#2

Looks like you don't know how to use GetPlayerName. Read the documentation for this and you'll see that you have to store it an array (string) first and that's what the function does.

pawn Код:
new PlayerName[24];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
Also keep in mind never to use those stupid wrapper functions which do the above and then return the PlayerName. This is a serious waste of computing!

Also, another thing I should mention is that the u specifier in sscanf stores INVALID_PLAYER_ID in the variable if the player is not found, so your IsPlayerConnected check is unnecessary, as it will come down to: IsPlayerConnected(INVALID_PLAYER_ID)... and how can an invalid ID be connected?
pawn Код:
if(sscanf(params, "udd", giveplayerid, statcode, amount))
{
    // ...
}
if(giveplayerid != INVALID_PLAYER_ID)
{
    // ...
}
Reply


Messages In This Thread
warning 202: number of arguments does not match definition - by MrRollexo - 04.06.2012, 10:48
Re: warning 202: number of arguments does not match definition - by AndreT - 04.06.2012, 10:55
Re: warning 202: number of arguments does not match definition - by MrRollexo - 04.06.2012, 11:12

Forum Jump:


Users browsing this thread: 1 Guest(s)