expression has no effect - 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: expression has no effect (
/showthread.php?tid=476970)
expression has no effect -
Blackazur - 21.11.2013
Who can help me?
Код:
if(pInfo[killerid][pKills] == 10) { pInfo[killerid][pRank] = 1,format(str,sizeof(str),""chat""OLD_ADMINCMD" [RANK] %s(%s) has been promoted to rank: Private 1",PlayerName(killerid)),killerid,SendClientMessageToAll(-1,str); }
Re: expression has no effect -
Konstantinos - 21.11.2013
pawn Код:
if(pInfo[killerid][pKills] == 10)
{
pInfo[killerid][pRank] = 1;
format(str,sizeof(str),""chat""OLD_ADMINCMD" [RANK] %s(%d) has been promoted to rank: Private 1",PlayerName(killerid),killerid);
SendClientMessageToAll(-1,str);
}
The problem was: PlayerName(killerid)),killerid
Also the id is integer, so it'd be %d, not %s.
Re: expression has no effect -
]Rafaellos[ - 21.11.2013
pawn Код:
if(pInfo[killerid][pKills] == 10) { pInfo[killerid][pRank] = 1,format(str,sizeof(str),""chat""OLD_ADMINCMD" [RANK] %s(%s) has been promoted to rank: Private 1",PlayerName(killerid),killerid),SendClientMessageToAll(-1,str); }
Just intend the code properly, to find the problems.