Warnings problem [2]
#1

Can anyone help me with these two warnings? Thank you in advance.

1. Note: sendername is already defined above.
pawn Код:
41021    if(!strcmp(cmd, "/engine", true))
41022    {
41023
41024        new name[MAX_PLAYER_NAME];
41025        GetPlayerName(playerid, name, sizeof(name));
41026        GetPlayerName(playerid, sendername, sizeof(sendername));
41027        new vehicleid = GetPlayerVehicleID(playerid);
41028        new Float:Vehhp;
41029        GetVehicleHealth(vehicleid, Vehhp);
pawn Код:
(41024) : warning 219: local variable "name" shadows a variable at a preceding level
2.
pawn Код:
40137    if(strcmp(cmd, "/breakin", true) == 0)
40138    {
40139        if(IsPlayerConnected(playerid))
40140       {
40141            if(BreakAllow[playerid] != 0)
40142           {
40143                SendClientMessage(playerid,COLOR_GREY,"You must wait for your time to reduce to rob again !");
40144                return 1;
40145            }
40146            if(PlayerInfo[playerid][pLevel] == 1)
40147           {
40148                SendClientMessage(playerid,COLOR_GREY,"You must be level 2 and above to use this!");
40149                return 1;
40150            }
40151            for(new h = 0; h < sizeof(HouseInfo); h++)
40152           {
40153                new name[MAX_PLAYER_NAME];
40154                GetPlayerName(playerid, name, sizeof(name));
40155                if (PlayerToPoint(3, playerid,HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h]40137[hEntrancez]))
40156               {
40157                    if(HouseInfo[h][hLock] == 1)
40158                   {
40159                        if(HouseInfo[h][hBreakTime] == 0)
pawn Код:
(40153) : warning 219: local variable "name" shadows a variable at a preceding level

Should I add the whole command/s?
Reply


Messages In This Thread
Warnings problem [2] - by marko94 - 08.11.2010, 18:08
Re: Warnings problem [2] - by Mauzen - 08.11.2010, 18:17
Re: Warnings problem [2] - by Scenario - 08.11.2010, 18:18
Re: Warnings problem [2] - by marko94 - 08.11.2010, 18:32

Forum Jump:


Users browsing this thread: 1 Guest(s)