foreach warning
#1

hey what does that mean?
Код:
C:\Users\Shani\Desktop\Anonymous Creek Roleplay\filterscripts\rpchats.pwn(43) : warning 219: local variable "using_deprecated_foreach_syntax" shadows a variable at a preceding level
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
this is the code:
Код:
stock ProxDetector(Float:radi, playerid, string[],color)
{
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,x,y,z);
    foreach(Player,i) // error line
    {
        if(IsPlayerInRangeOfPoint(i,radi,x,y,z))
        {
            SendClientMessage(i,color,string);
        }
    }
}
thanks in advance
Reply
#2

Deprecated version, use:
pawn Код:
foreach(new i : Player)
Reply
#3

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Deprecated version, use:
pawn Код:
foreach(new i : Player)
thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)