sscanf warning
#1

Hello guys!

I was testing a simple command "/adnos" but when i was checking the console, i got a warning:

Quote:

sscanf warning: format specifier does not match parameter count.

PHP код:
dcmd_adnos(playerid,params[])
{
    new 
string[128];
    new 
ID;
    if(
sscanf(params,"us[100]",ID))
    {
        
SendClientMessage(playerid,COLOR_NUB,"USAGE: /adnos (Player Name/ID)");
        return 
1;
    }
    if(
IsSpawned[playerid] != 1)
    {
        
SendClientMessage(playerid,COLOR_NUB,"[ERROR]{FFFFFF}You must be spawned. Otherwise, you can't type this command.");
        return 
1;
    }
    if(!
IsPlayerInAnyVehicle(ID))
    {
        
SendClientMessage(playeridCOLOR_NUB"That player is not in a car, you cannot give him/her nos!");
        return 
1;
    }
    if(!
IsPlayerConnected(ID))
    {
        
format(string,sizeof(string),"The player ID (%d) is not connected to the server. You cannot give him nos.",ID);
        
SendClientMessage(playerid,COLOR_NUB,string);
        return 
1;
    }
    
AddVehicleComponent(GetPlayerVehicleID(ID), 1010);
    
SendClientMessage(playerid,COLOR_YELLOW"[[_NOS_]] You have added nos to his/her car!");
    return 
1;

What does that mean?
Reply


Messages In This Thread
sscanf warning - by [CG]Milito - 17.12.2012, 00:13
Re: sscanf warning - by zDevon - 17.12.2012, 00:38
Respuesta: sscanf warning - by [CG]Milito - 17.12.2012, 01:46

Forum Jump:


Users browsing this thread: 2 Guest(s)