12.10.2011, 23:13
How can i solve these warnings? i got 3 of them
1 of 3 codes:
pawn Код:
new pName[MAX_PLAYER_NAME];
warning 219: local variable "pName" shadows a variable at a preceding level
pawn Код:
CMD:get(playerid,params[])
{
new id;
new pName[MAX_PLAYER_NAME];
new pName2[MAX_PLAYER_NAME];
if ( GetPVarInt( playerid, "Level" ) == 0 )return SendClientMessage(playerid, 0xFF0000FF, "Only admin 1-3 can use this command!!");
if(sscanf(params,"us[128]",id)) return SendClientMessage(playerid,COLOR_YELLOW,"Correct Usage:/get [ID]");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED,"Player ID Doesn't Exist");
{
new Float:X, Float:Y, Float:Z;
GetPlayerName(playerid,pName,sizeof(pName));
GetPlayerName(id,pName2,sizeof(pName2));
GetPlayerPos(playerid, X, Y, Z);
SetPlayerPos(id, X, Y, Z);
}
return 1;
}