25.05.2013, 07:22
So I compile it and I get a warning of:
any help please?, thanks in advance.
pawn Код:
warning 219: local variable "idx" shadows a variable at a preceding level
pawn Код:
for(new idx=0; idx<MAX_DOORS; idx++) // Dynamic Doors
{
if(IsPlayerInRangeOfPoint(playerid, 2, DoorInfo[idx][dOX], DoorInfo[idx][dOY], DoorInfo[idx][dOZ]))
{
if(DoorInfo[idx][dIInt] == 83 && DoorInfo[idx][dIVW] == 8473 && BankBlock)
{
SendClientMessage(playerid, COLOR_GREY, "You can't enter the bank as it is being robbed at the moment.");
return 1;
}
if(DoorInfo[idx][dCInt])
{
GameTextForPlayer(playerid, "~w~Loading Objects", 3500, 3);
TogglePlayerControllable(playerid, 0);
SetTimerEx("EnterExitTimer", 5000, false, "i", playerid);
PlayerInfo[playerid][pSpawnFreeze] = 1;
}
PlayerInfo[playerid][pSpawnFreeze] = 0;
SetPlayerInterior(playerid, DoorInfo[idx][dIInt]);
SetPlayerVirtualWorld(playerid, DoorInfo[idx][dIVW]);
SetPlayerFacingAngle(playerid, DoorInfo[idx][dIA]);
SetCameraBehindPlayer(playerid);
SetPlayerPos(playerid, DoorInfo[idx][dIX], DoorInfo[idx][dIY], DoorInfo[idx][dIZ]);
return 1;
}
}