1 Warning need help
#6

Why do you declare a new variable that it will always be 0 when you can use playerid?

pawn Код:
stock CheckAimingRobNPC(playerid)
{
    for (new x = 1; x <= npcnum; x++)
    {
        if(playerid == robnpc[x])
        {
            return robnpc[x];
        }
    }
   
    return INVALID_PLAYER_ID;
}
Quote:
Originally Posted by PrivatioBoni
Посмотреть сообщение
Surely just change:

pawn Код:
stock CheckAimingRobNPC(playerid)
to
pawn Код:
stock CheckAimingRobNPC(targetplayer)
Good luck!
No, that will give warning 219: local variable "targetplayer" shadows a variable at a preceding level and another warning that "targetplayer" is never used.
Reply


Messages In This Thread
1 Warning need help - by iThePunisher - 08.04.2014, 14:39
Re: 1 Warning need help - by Twizted - 08.04.2014, 14:40
Re: 1 Warning need help - by Konstantinos - 08.04.2014, 14:42
Re: 1 Warning need help - by iThePunisher - 08.04.2014, 14:51
Re: 1 Warning need help - by PrivatioBoni - 08.04.2014, 14:53
Re: 1 Warning need help - by Konstantinos - 08.04.2014, 14:58
Re: 1 Warning need help - by Ari - 08.04.2014, 15:41

Forum Jump:


Users browsing this thread: 1 Guest(s)