Command ERROR
#1

I try to compile this command

Код:
    if(strcmp(cmd, "/novi", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	    	if(PlayerInfo[playerid][pLevel] < 3)
	    	{
				GetPlayerName(playerid, sendername, sizeof(sendername));
				if(nTime[playerid] == 1) return SendClientMessage(playerid, COLOR_GRAD2, "Morate pricekati 2 minute!");
				format(string, 256, ""COLOR_RED"|CityBot|{FFFFFF} "COLOR_RED"%s {FFFFFF}je novi igrac i treba mu pomoc!",sendername);
				ABroadCast(COLOR_WHITE,string,1);
				SendClientMessage(playerid, COLOR_YELLOW, "* Hvala na prijavi, Admini i GameShark-si ce odgovoriti u najkracem roku!");
				nTime[playerid] = 1;
	            SetTimerEx("Novi", 120000, false, "%d", playerid);
			 }
			else
			{
				SendClientMessage(playerid, COLOR_WHITE, "("COLOR_RED"Greska{FFFFFF}!) Samo igraci do levela "COLOR_RED"3!");
			}
	    }
	    return 1;
	}

But i get this errors:

Код:
D:\PC Games\GTA San Andreas\Crime City RPG Macedonia\gamemodes\blrp.pwn(38302) : error 001: expected token: "-string end-", but found "-identifier-"
D:\PC Games\GTA San Andreas\Crime City RPG Macedonia\gamemodes\blrp.pwn(38302) : error 001: expected token: "-string end-", but found "-identifier-"
D:\PC Games\GTA San Andreas\Crime City RPG Macedonia\gamemodes\blrp.pwn(38302) : warning 215: expression has no effect
D:\PC Games\GTA San Andreas\Crime City RPG Macedonia\gamemodes\blrp.pwn(38302) : error 001: expected token: ";", but found "-integer value-"
D:\PC Games\GTA San Andreas\Crime City RPG Macedonia\gamemodes\blrp.pwn(38302) : fatal error 107: too many error messages on one line
LINE 38302:
Код:
format(string, 256, ""COLOR_RED"|CityBot|{FFFFFF} "COLOR_RED"%s {FFFFFF}je novi igrac i treba mu pomoc!",sendername);
Reply
#2

Код:
"COLOR_RED"
Show me that define.
Reply
#3

#define COLOR_RED 0xAA3333AA
Reply
#4

Try this, i think this is what you want to do:

pawn Код:
format(string, 256, "{FF0000}|CityBot|{FFFFFF} {FF0000}%s {FFFFFF}je novi igrac i treba mu pomoc!",sendername);
Reply
#5

thanks Rafaellos but i fixed it on other way... I change the #define COL_RED and it compiled without errors

Shetch rep+1
Rafaellos rep+1
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)