SA-MP Forums Archive
Warnings help - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Warnings help (/showthread.php?tid=193372)



Warnings help - marinov - 25.11.2010

pawn Код:
C:\Users\Marino Varesio\Desktop\zombie outbreak\gamemodes\Zombie_Outbreak_Original.pwn(2682) : warning 219: local variable "X" shadows a variable at a preceding level
C:\Users\Marino Varesio\Desktop\zombie outbreak\gamemodes\Zombie_Outbreak_Original.pwn(2682) : warning 219: local variable "Y" shadows a variable at a preceding level
C:\Users\Marino Varesio\Desktop\zombie outbreak\gamemodes\Zombie_Outbreak_Original.pwn(2682) : warning 219: local variable "Z" shadows a variable at a preceding level
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Warnings.
Line :

pawn Код:
PlayerToPoint(Float:radius, playerid, Float:X, Float:Y, Float:Z) //<<<< that's the line
{
    new Float:oldpos[3], Float:temppos[3];
    GetPlayerPos(playerid, oldpos[0], oldpos[1], oldpos[2]);
    temppos[0] = (oldpos[0] -X);
    temppos[1] = (oldpos[1] -Y);
    temppos[2] = (oldpos[2] -Z);
    if(((temppos[0] < radius) && (temppos[0] > -radius)) && ((temppos[1] < radius) && (temppos[1] > -radius)) && ((temppos[2] < radius) && (temppos[2] > -radius)))
    {
        return true;
    }
    return false;
}



Re: Warnings help - Kitten - 25.11.2010

pawn Код:
PlayerToPoint(Float:radius, playerid, Float:X2, Float:Y2, Float:Z2) //<<<< that's the line
{
    new Float:oldpos[3], Float:temppos[3];
    GetPlayerPos(playerid, oldpos[0], oldpos[1], oldpos[2]);
    temppos[0] = (oldpos[0] -X2);
    temppos[1] = (oldpos[1] -Y2);
    temppos[2] = (oldpos[2] -Z2);
    if(((temppos[0] < radius) && (temppos[0] > -radius)) && ((temppos[1] < radius) && (temppos[1] > -radius)) && ((temppos[2] < radius) && (temppos[2] > -radius)))
    {
        return true;
    }
    return false;
}



Re: Warnings help - marinov - 25.11.2010

thx kitten