help me please
#1

This bug is showen to me can any one help me
pawn Код:
C:\Users\Mohamad\Desktop\San Andreas Roleplay\gamemodes\gtarlrp.pwn(37994) : warning 219: local variable "idx" shadows a variable at a preceding level
C:\Users\Mohamad\Desktop\San Andreas Roleplay\gamemodes\gtarlrp.pwn(38814) : warning 219: local variable "idx" shadows a variable at a preceding level
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Warnings.
in line 37994 and line below wrote:
pawn Код:
for(new idx = 0; idx< sizeof(DoorInfo); idx++) // Dynamic Doors < sizeof(
        {
            if(IsPlayerInRangeOfPoint(playerid, 2, DoorInfo[idx][dOX], DoorInfo[idx][dOY], DoorInfo[idx][dOZ]))
            {
                if(DoorInfo[idx][dCInt])
                {
                    Pause(playerid);
                }
                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;
            }
        }
in line 38814 and line below wrote:
pawn Код:
for(new idx=0; idx<MAX_DOORS; idx++) // Dynamic Doors
        {
            if(IsPlayerInRangeOfPoint(playerid, 2, DoorInfo[idx][dIX], DoorInfo[idx][dIY], DoorInfo[idx][dIZ]) && GetPlayerVirtualWorld(playerid) == DoorInfo[idx][dIVW] && GetPlayerInterior(playerid) == DoorInfo[idx][dIInt])
            {
                if(DoorInfo[idx][dCExt])
                {
                    Pause(playerid);
                }
                SetPlayerInterior(playerid, DoorInfo[idx][dOInt]);
                SetPlayerVirtualWorld(playerid, DoorInfo[idx][dOVW]);
                SetPlayerFacingAngle(playerid, DoorInfo[idx][dOA]);
                SetCameraBehindPlayer(playerid);
                SetPlayerPos(playerid, DoorInfo[idx][dOX], DoorInfo[idx][dOY], DoorInfo[idx][dOZ]);
            }
        }
Reply
#2

any help??
Reply
#3

I'm so interested to see the solution of this, any help?
Reply
#4

Hello

Try this, i'm not a very good scripter, but try...

pawn Код:
for(new ptidx = 0; ptidx< sizeof(DoorInfo); ptidx++) // Dynamic Doors < sizeof(
{
    if(IsPlayerInRangeOfPoint(playerid, 2, DoorInfo[ptidx][dOX], DoorInfo[ptidx][dOY], DoorInfo[ptidx][dOZ]))
    {
        if(DoorInfo[ptidx][dCInt])
        {
            Pause(playerid);
        }
        else
        {
            SetPlayerInterior(playerid, DoorInfo[ptidx][dIInt]);
            SetPlayerVirtualWorld(playerid, DoorInfo[ptidx][dIVW]);
            SetPlayerFacingAngle(playerid, DoorInfo[ptidx][dIA]);
            SetCameraBehindPlayer(playerid);
            SetPlayerPos(playerid, DoorInfo[ptidx][dIX], DoorInfo[ptidx][dIY], DoorInfo[ptidx][dIZ]);
        }
        return 1;
    }
}

for(new ptiidx=0; ptiidx<MAX_DOORS; ptiidx++) // Dynamic Doors
{  
    if(IsPlayerInRangeOfPoint(playerid, 2, DoorInfo[ptiidx][dIX], DoorInfo[ptiidx][dIY], DoorInfo[ptiidx][dIZ]) && GetPlayerVirtualWorld(playerid) == DoorInfo[ptiidx][dIVW] && GetPlayerInterior(playerid) == DoorInfo[ptiidx][dIInt])
    {
        if(DoorInfo[ptiidx][dCExt])
        {
            Pause(playerid);
        }
        else
        {
            SetPlayerInterior(playerid, DoorInfo[ptiidx][dOInt]);
            SetPlayerVirtualWorld(playerid, DoorInfo[ptiidx][dOVW]);
            SetPlayerFacingAngle(playerid, DoorInfo[ptiidx][dOA]);
            SetCameraBehindPlayer(playerid);
            SetPlayerPos(playerid, DoorInfo[ptiidx][dOX], DoorInfo[ptiidx][dOY], DoorInfo[ptiidx][dOZ]);
        }
        return 1;
    }
}
I hope help you

PT
Reply
#5

thx bro for help
Reply
#6

You Welcome!

PT
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)