wrong code?
#1

Hi,i've this code for admin chat

Код:
		if(text[0] == '@' && if (pInfo[playerid][pAdmin] >= 2)
	{
	    new string[128];
	    format(string,sizeof(string),"[Admin Chat %s(ID:%d)]: %s",GetPName(playerid),playerid,text[1]);
		for(new i = 0; i < MAX_PLAYERS; i++)
		{
		   if (pInfo[playerid][pAdmin] >= 2) && IsPlayerConnected(i))
		    {
				SendClientMessage(i,COLOR_YELLOW,string);
		    }
		}
		return 0;
	}
But i get this errors:

Код:
C:\Documents and Settings\Symone\Desktop\SFTDM.pwn(898) : warning 219: local variable "playername" shadows a variable at a preceding level
C:\Documents and Settings\Symone\Desktop\SFTDM.pwn(904) : warning 219: local variable "playername" shadows a variable at a preceding level
C:\Documents and Settings\Symone\Desktop\SFTDM.pwn(1072) : warning 219: local variable "playername" shadows a variable at a preceding level
C:\Documents and Settings\Symone\Desktop\SFTDM.pwn(1632) : error 017: undefined symbol "text"
C:\Documents and Settings\Symone\Desktop\SFTDM.pwn(1632) : warning 215: expression has no effect
C:\Documents and Settings\Symone\Desktop\SFTDM.pwn(1632) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Symone\Desktop\SFTDM.pwn(1632) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Symone\Desktop\SFTDM.pwn(1632) : fatal error 107: too many error messages on one line

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


4 Errors.
Any help?
Reply
#2

Your error is on 1632 line. ( You have the lines in left.)
Check there and send me the code from there on PM!
Reply
#3

Quote:
Originally Posted by snac24
Посмотреть сообщение
Your error is on 1632 line. ( You have the lines in left.)
Check there and send me the code from there on PM!
@snac24: Djeez, man. I already saw the error by looking at the first line ...
And this is a forum for a reason, it isn't here just to communicate with PMs.

pawn Код:
if(text[0] == '@' && if (pInfo[playerid][pAdmin] >= 2)
should be:

pawn Код:
if(text[0] == '@' && pInfo[playerid][pAdmin] >= 2)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)