[21:07:38] sscanf warning: Strings without a length are deprecated, please add a destination size. [21:07:38] sscanf warning: 'z' is deprecated, consider using 'S' instead. [21:07:38] sscanf warning: No default value found. [21:07:38] sscanf warning: Format specifier does not match parameter count.
new somethin[10];
if(sscanf(params, "s[10]", somethin)) return SendClientMessage(playerid, -1, "some error message");
dcmd_cage(playerid,params[])
{
if(AccInfo[playerid][Level] < 2)
return ErrorMessages(playerid, 5);
new id, reason[64],string[128];
if(sscanf(params,"is",id,reason)) return SendClientMessage(playerid, COLOR_GREEN,"USAGE: /cage [PlayerId] [reason]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_GREEN,"The Player is not connected!");
new pName[MAX_PLAYER_NAME];
new vName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,32);
GetPlayerName(id,vName,32);
CagePlayer(id);
format(string,sizeof string,"** ADMIN CAGE: %s has been caged - %s",vName,reason);
SendClientMessageToAll(adminpink,string);
return 1;
}
if(sscanf(params,"is[64]",id,reason))
dcmd_cage(playerid,params[])
{
if(AccInfo[playerid][Level] < 2)
return ErrorMessages(playerid, 5);
new id,string[128];
if(sscanf(params,"us",id,params)) return SendClientMessage(playerid, COLOR_GREEN,"USAGE: /cage [PlayerId] [reason]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_GREEN,"The Player is not connected!");
new pName[MAX_PLAYER_NAME];
new vName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,32);
GetPlayerName(id,vName,32);
CagePlayer(id);
format(string,sizeof string,"** ADMIN CAGE: %s has been caged - %s",vName,params);
SendClientMessageToAll(adminpink,string);
return 1;
}
"is[64]",
(1828) : warning 219: local variable "pName" shadows a variable at a preceding level
(1846) : warning 219: local variable "pName" shadows a variable at a preceding level
new pName[MAX_PLAYER_NAME];
pawn Код:
1828 and 1846: pawn Код:
|