Help with warning and /eject command?
#6

I'll give you an example:
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;
}
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"
Reply


Messages In This Thread
Help with warning and /eject command? - by DeltaAirlines12 - 11.12.2009, 20:41
Re: Help with warning and /eject command? - by LarzI - 11.12.2009, 21:34
Re: Help with warning and /eject command? - by DeltaAirlines12 - 11.12.2009, 23:22
Re: Help with warning and /eject command? - by LarzI - 12.12.2009, 00:20
Re: Help with warning and /eject command? - by DeltaAirlines12 - 12.12.2009, 00:31
Re: Help with warning and /eject command? - by LarzI - 12.12.2009, 00:49
Re: Help with warning and /eject command? - by DeltaAirlines12 - 12.12.2009, 01:15
Re: Help with warning and /eject command? - by LarzI - 12.12.2009, 01:49

Forum Jump:


Users browsing this thread: 2 Guest(s)