SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 14/04/2012, 09:16 AM   #1
NeroX98
Huge Clucker
 
Join Date: Jun 2011
Location: Veles, Macedonia
Posts: 218
Reputation: 1
Default Command ERROR

I try to compile this command

Code:
    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:

Code:
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:
Code:
format(string, 256, ""COLOR_RED"|CityBot|{FFFFFF} "COLOR_RED"%s {FFFFFF}je novi igrac i treba mu pomoc!",sendername);
NeroX98 is offline   Reply With Quote
Old 14/04/2012, 09:17 AM   #2
Shetch
Huge Clucker
 
Shetch's Avatar
 
Join Date: Feb 2011
Location: Latvia
Posts: 482
Reputation: 34
Default Re: Command ERROR

Code:
"COLOR_RED"
Show me that define.
__________________
Shetch is offline   Reply With Quote
Old 14/04/2012, 09:20 AM   #3
NeroX98
Huge Clucker
 
Join Date: Jun 2011
Location: Veles, Macedonia
Posts: 218
Reputation: 1
Default Re: Command ERROR

#define COLOR_RED 0xAA3333AA
NeroX98 is offline   Reply With Quote
Old 14/04/2012, 09:32 AM   #4
]Rafaellos[
Gangsta
 
Join Date: Feb 2012
Location: Cyprus
Posts: 597
Reputation: 37
Default Re: Command ERROR

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

pawn Code:
format(string, 256, "{FF0000}|CityBot|{FFFFFF} {FF0000}%s {FFFFFF}je novi igrac i treba mu pomoc!",sendername);
__________________
]Rafaellos[ is offline   Reply With Quote
Old 14/04/2012, 09:37 AM   #5
NeroX98
Huge Clucker
 
Join Date: Jun 2011
Location: Veles, Macedonia
Posts: 218
Reputation: 1
Default Re: Command ERROR

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
NeroX98 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
help with a command i have 1 error boyan96 Scripting Help 5 29/08/2011 05:50 PM
An error has occured. (Error ID: 2014, Commands out of sync; you can't run this command now) Tom_Dedi Help Archive 3 07/11/2010 02:01 PM
error with command /pay Shellegg Help Archive 9 31/03/2009 11:25 AM
Error with command JoeDaDude Help Archive 3 06/02/2009 12:09 AM


All times are GMT. The time now is 01:30 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.