24.09.2011, 17:37
Hey guys,
Im getting the error in console: 'sscanf warning: No default value found. sscanf warning: Format specifier does not match parameter count.'.
Im not sure how i can solve this, i know about the first one; but since i already did it how it should be solved, it still gives me the error.
Im getting the error in console: 'sscanf warning: No default value found. sscanf warning: Format specifier does not match parameter count.'.
Im not sure how i can solve this, i know about the first one; but since i already did it how it should be solved, it still gives me the error.
pawn Код:
YCMD:setadmin(playerid, params[], help)
{
#pragma unused help
new Player, Level;
if( IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 8 )
{
if(!sscanf(params, "uiS[50](N/A)", Player, Level, params))
{
if( Player == INVALID_PLAYER_ID ) return SendClientMessage(playerid, COLOR_RED, " ** Verkeerde playerid! Probeer het nog is ");
// if( Player == playerid ) return SendClientMessage(playerid, COLOR_RED, " ** Je kan je eigen level niet veranderen ");
if( strlen( params ) > 50 ) return SendClientMessage(playerid, COLOR_RED, " ** Maximum reason size: 50 ");
if( Level > 1337 ) return SendClientMessage(playerid, COLOR_RED, " ** Maximum level: 10 ");
PlayerInfo[Player][pAdmin] = Level;
new AS[128], AS1[128];
format( AS, sizeof AS, " ** %s heeft jouw admin level verandert naar %i. Reden: %s ", GetName(playerid), Level, params);
format( AS1, sizeof AS1, " ** Jij hebt %s's admin level verandert naar %i. Reden: %s ", GetName(Player), Level, params);
SendClientMessage(playerid, COLOR_GREEN, AS1); SendClientMessage(Player, COLOR_GREEN, AS);
} else return SendClientMessage(playerid, COLOR_GREEN, " ** Usage: /setadmin [playerid] [level] [reden] ");
} else return SendClientMessage(playerid, COLOR_RED, " ** Je moet een admin zijn om deze command te doen! (Level 8) ");
return 1;
}