new pName[MAX_PLAYER_NAME];
#1

How can i solve these warnings? i got 3 of them
pawn Код:
new pName[MAX_PLAYER_NAME];

warning 219: local variable "pName" shadows a variable at a preceding level
1 of 3 codes:
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;
}
Reply


Messages In This Thread
new pName[MAX_PLAYER_NAME]; - by cruising - 12.10.2011, 23:13
Re: new pName[MAX_PLAYER_NAME]; - by grand.Theft.Otto - 12.10.2011, 23:20
Re: new pName[MAX_PLAYER_NAME]; - by cruising - 12.10.2011, 23:23
Re: new pName[MAX_PLAYER_NAME]; - by Kush - 12.10.2011, 23:28
Re: new pName[MAX_PLAYER_NAME]; - by cruising - 12.10.2011, 23:35
Re: new pName[MAX_PLAYER_NAME]; - by Kush - 12.10.2011, 23:35

Forum Jump:


Users browsing this thread: 1 Guest(s)