12.12.2009, 00:49
I'll give you an example:
So to fix, delete the PlayerName vars (new PlayerName[MAX_PLAYER_NAME]; or w/e you have defined it as) which is inside { and } and leave the global one ( whichi isn't inside any braces), since that's the one you "need"
pawn Код:
new PlayerName[24];
//As you can see, this line is all by itself, not inside any braces ( { and } )
public OnPlayerConnect(playerid)
{
new PlayerName[24];
/*This line is "making" the warning. Since we already have
defined "PlayerName" global (as I said, not inside any braces)
and we're trying to define it again inside a function. This is not
necesarry, since when you define a variable "global" all callbacks
and functions will "use" that variable, so you don't have to make a new one.*/
return true;
}