warning 219: local variable "PlayerName" shadows a variable at a preceding level
#1

Error:
PHP код:
\pawno\include\lfuncs.inc(645) : warning 219local variable "PlayerName" shadows a variable at a preceding level 
Code of lfuncs:

PHP код:
stock ReturnPlayerID(PlayerName[])
{
    for(new 
0MAX_PLAYERSi++)
    {
    if(
IsPlayerConnected(i))
    {
    if(
strfind(pName(i),PlayerName,true)!=-1)
    return 
i;
    }
    }
    return 
INVALID_PLAYER_ID;

This is the line error:

PHP код:
stock ReturnPlayerID(PlayerName[]) 
Reply
#2

Check this out:
pawn Код:
stock ReturnPlayerID(plname[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(strfind(pName(i),plname,true)!=-1)
    return i;
    }
    }
    return INVALID_PLAYER_ID;
}
Reply
#3

It worked! Thanks Norck
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)