killstreak compile problems
#1

Код:
Kills[killerid] ++;
new string1[128], string2[128],string3[128], pname[MAX_PLAYER_NAME], kname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
GetPlayerName(killerid, kname, sizeof(kname));
if(IsPlayerConnected(playerid))
{
if(Kills[playerid] > 0)
{
format(string1, sizeof(string1), ""{COL_RED}"* {%06x}%s(%d) "{COL_RED}"ended %s(%d) killstreak of %d kills!",GetPlayerColor(killerid) >>> 8, kname, killerid, pname, playerid, Kills[playerid]);
SendClientMessageToAll(COLOR_RED, string1);
}
if(Kills[killerid] = 3)
{
format(string2, sizeof(string2)), ""{COL_RED}"* {%06x}%s(%d) "{COL_RED}"is on a killstreak with 3 kills!",GetPlayerColor(killerid) >>> 8, kname, killerid);
SendClientMessageToAll(COLOR_RED, string2);
}
if(Kills[killerid] = 5)
{
format(string3, sizeof(string3)), ""{COL_RED}"* {%06x}%s(%d) "{COL_RED}"is on a killstreak with 5 kills!",GetPlayerColor(killerid) >>> 8, kname, killerid);
SendClientMessageToAll(COLOR_RED, string3);
}
}
I've made this code OnPlayerDeath and I got these errors:

Код:
(1740) : error 001: expected token: "-string end-", but found "-identifier-"
(1740) : warning 215: expression has no effect
(1740) : error 001: expected token: ";", but found "}"
(1740) : error 029: invalid expression, assumed zero
(1740) : fatal error 107: too many error messages on one line
I guess something is wrong with the string formatting..

If someone can help me it will be great, Thanks
Reply


Messages In This Thread
killstreak compile problems - by rakinz - 26.11.2017, 12:35
Re: killstreak compile problems - by RedFusion - 26.11.2017, 12:38
Re: killstreak compile problems - by rakinz - 26.11.2017, 15:22
Re: killstreak compile problems - by Konstantinos - 26.11.2017, 18:24
Re: killstreak compile problems - by rfr - 26.11.2017, 19:12

Forum Jump:


Users browsing this thread: 1 Guest(s)