SA-MP Forums Archive
How to fix this warning - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to fix this warning (/showthread.php?tid=465947)



How to fix this warning - Jizz - 25.09.2013

pawn Код:
//DRAG
forward Dragging(playerid, ID);
public Dragging(playerid, ID)
{
if(Dragged[playerid] != -1)
        {
            new ID = Dragged[playerid];
            new Float:dX, Float:dY, Float:dZ;
            GetPlayerPos(ID, dX, dY, dZ);
            SetPlayerPos(playerid, dX+1, dY, dZ);
            SetPlayerInterior(playerid, GetPlayerInterior(ID));
            SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(ID));
        }
}
Quote:

warning 219: local variable "ID" shadows a variable at a preceding level

Anyone?


Re: How to fix this warning - JamesH - 25.09.2013

Check the other thread you've made.