Problem with this cmd
#3

This is my OnPlayerText

Код:
public OnPlayerText(playerid, text[])
{
     if(text[0] == '@')
    {
        if(PlayerInfo[playerid][AdminLevel] > 2)
        {
            if(!strlen(cmdtext[2])) return SendClientMessage(playerid, ORANGE, "USAGE: @<text>");
            SendClientMessage(playerid, COLOR_ORANGE, "HELP: Example: @Hi");
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, sizeof(string), "Admin Chat [%i]%s: %s" ,playerid,sendername, cmdtext[2]);
            SendMessageToAdmins(COLOR_GREEN, string, 1);
            return 1;
        }
        else return SendClientMessage(playerid, RED, No.");
    }
	SetPlayerChatBubble(playerid, text, 0xFF0000FF, 100.0, 5000);
    return 1;
}
Errors:

Код:
C:\Documents and Settings\k\Desktop\SFWAR.pwn(146) : error 017: undefined symbol "cmdtext"
C:\Documents and Settings\k\Desktop\SFWAR.pwn(146) : warning 215: expression has no effect
C:\Documents and Settings\k\Desktop\SFWAR.pwn(146) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\k\Desktop\SFWAR.pwn(146) : error 029: invalid expression, assumed zero
C:\Documents and Settings\k\Desktop\SFWAR.pwn(146) : fatal error 107: too many error messages on one line

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


4 Errors.
The line 146 is:

if(!strlen(cmdtext[2])) return SendClientMessage(playerid, ORANGE, "USAGE: @<text>");

I need to add cmdtext,but how?
Reply


Messages In This Thread
Problem with this cmd - by Face9000 - 16.12.2010, 10:59
Re: Problem with this cmd - by Ash. - 16.12.2010, 11:15
Re: Problem with this cmd - by Face9000 - 16.12.2010, 11:32
Re: Problem with this cmd - by Ash. - 16.12.2010, 11:42
Re: Problem with this cmd - by Ash. - 16.12.2010, 11:45
Re: Problem with this cmd - by Ash. - 16.12.2010, 11:48
Re: Problem with this cmd - by Face9000 - 16.12.2010, 11:57
Re: Problem with this cmd - by veyron - 16.12.2010, 12:12
Re: Problem with this cmd - by Face9000 - 16.12.2010, 12:14
Re: Problem with this cmd - by veyron - 16.12.2010, 12:19

Forum Jump:


Users browsing this thread: 4 Guest(s)