Admin Chat
#1

Код:
COMMAND:a(playerid, params[])
{
      if (APlayerData[playerid][PlayerLevel] >= 3)
      new result[128];
      if(sscanf(params,"s[128]",result)) return SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /a [message]");
      {
       new string[128],Name[MAX_PLAYER_NAME];
       GetPlayerName(playerid,Name,sizeof(Name);
       format(string,sizeof(string),"[ADMIN-CHAT] %s (%d): %s",Name,playerid,result);
       foreach(Player,i) if (APlayerData[playerid][PlayerLevel] >= 3) SendClientMessage(i,0x00FF00FF,string);
       return 1;
}

I get dis error
Код:
C:\Users\pawno\include\PPC_PlayerCommands.inc(4943) : error 003: declaration of a local variable must appear in a compound block
C:\Users\pawno\include\PPC_PlayerCommands.inc(4943) : error 017: undefined symbol "result"
C:\Users\pawno\include\PPC_PlayerCommands.inc(4943) : warning 215: expression has no effect
C:\Users\pawno\include\PPC_PlayerCommands.inc(4943) : error 001: expected token: ";", but found "]"
C:\Users\pawno\include\PPC_PlayerCommands.inc(4943) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply


Messages In This Thread
Admin Chat - by DerickClark - 19.01.2013, 21:54
Re: Admin Chat - by InfiniTy. - 19.01.2013, 21:57
Re: Admin Chat - by DerickClark - 19.01.2013, 22:01
Re: Admin Chat - by InfiniTy. - 19.01.2013, 22:05
Re: Admin Chat - by Goldino - 19.01.2013, 22:06
Re: Admin Chat - by DerickClark - 19.01.2013, 22:08
Re: Admin Chat - by InfiniTy. - 19.01.2013, 22:12
Re: Admin Chat - by DerickClark - 19.01.2013, 22:24
Re: Admin Chat - by InfiniTy. - 19.01.2013, 22:26
Re: Admin Chat - by DerickClark - 19.01.2013, 22:37

Forum Jump:


Users browsing this thread: 1 Guest(s)