Command ERROR - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Command ERROR (
/showthread.php?tid=334232)
Command ERROR -
NeroX98 - 14.04.2012
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);
Re: Command ERROR -
Shetch - 14.04.2012
Show me that define.
Re: Command ERROR -
NeroX98 - 14.04.2012
#define COLOR_RED 0xAA3333AA
Re: Command ERROR -
]Rafaellos[ - 14.04.2012
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);
Re: Command ERROR -
NeroX98 - 14.04.2012
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