Help Fix These Error Codes?
#1

Код:
C:\Documents and Settings\Administrator\Desktop\DeathMatch Backup.pwn(176) : error 017: undefined symbol "COLOR_GREEN"
C:\Documents and Settings\Administrator\Desktop\DeathMatch Backup.pwn(180) : error 017: undefined symbol "COLOR_GREEN"
C:\Documents and Settings\Administrator\Desktop\DeathMatch Backup.pwn(183) : warning 209: function "OnPlayerCommandText" should return a value
Heres The Lines

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/myteam", cmdtext, true, 10) == 0)
	{
	if (pTeam[playerid] == team_Army)
	    {
  				SendClientMessage(playerid,COLOR_GREEN, "You are a bad guy");
	    }
		else if (pTeam[playerid] == team_Fbi)
		    {
			        SendClientMessage(playerid,COLOR_GREEN, "You are a good guy");
         }
	return 1;}
}
Код:
Yes I do have

//Colors

	#define COLOR_GREY 0xAFAFAFAA
	#define COLOR_GREEN 0x33AA33AA
	#define COLOR_BRIGHTRED 0xFF0000AA
	#define COLOR_YELLOW 0xFFFF00AA
	#define COLOR_PINK 0xFF66FFAA
	#define COLOR_BLUE 0x3A47DEFF
	#define COLOR_TAN 0xBDB76BAA
	#define COLOR_PURPLE 0x800080AA
	#define COLOR_WHITE 0xFFFFFFAA
	#define COLOR_LIGHTBLUE 0x33CCFFAA
	#define COLOR_ORANGE 0xFF9900AA
	#define COLOR_INDIGO 0x4B00B0AA
	#define COLOR_BLACK 0x00000000
	#define COLOR_DARKGREY 0x696969FF
	#define COLOR_RED 0xFF0000AA
Reply
#2

If you still need help...
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/myteam", cmdtext, true, 10) == 0)
    {
    if (pTeam[playerid] == team_Army)
        {
                SendClientMessage(playerid,COLOR_0x33AA33AA, "You are a bad guy");
        }
        else if (pTeam[playerid] == team_Fbi)
            {
                    SendClientMessage(playerid, 0x33AA33AA, "You are a good guy");
         }
    return 1;
}
Reply
#3

Put the defines above OnPlayerCommandText, aka - on top of your script.

Darnell, there's something wrong with '}' in your fix. Try this:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (!strcmp("/myteam", cmdtext, true, 7))
    {
        if (pTeam[playerid] == team_Army)
        {
            SendClientMessage(playerid,COLOR_GREEN, "You are a bad guy");
        }
        else if (pTeam[playerid] == team_Fbi)
        {
            SendClientMessage(playerid,COLOR_GREEN, "You are a good guy");
        }
        return 1;
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)