Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

local variable shadows a variable at a preceding level

$
0
0
Hello,
i'm getting a warning "local variable "OnDutyPD" shadows a variable at a preceding level".

Global:
PHP Code:

new OnDutyPD[MAX_PLAYERS] = 1

Function:
PHP Code:

SendMessageToCopsBackup(OnDutyPD,Float:xbackFloat:ybackFloat:zback,COLOR,msg); 

PHP Code:

stock SendMessageToCopsBackup(OnDutyPD,Float:xbackFloat:ybackFloat:zback,color,text[]) // This line i'm getting a warning
{
    for(new 
i=0i<MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i))
        {
            if(
playerDB[i][job]==1)
            {
                if(
OnDutyPD[i]==1)
                   {
                    
SendClientMessage(i,color,text);
                    
SetPlayerCheckpoint(ixbackybackzback3.0);
                    return 
1;
                }
            }    
        }
    }


Thanks a Lot.

Viewing all articles
Browse latest Browse all 18226

Trending Articles