17.12.2012, 00:13
Hello guys!
I was testing a simple command "/adnos" but when i was checking the console, i got a warning:
What does that mean?
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(playerid, COLOR_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;
}