Team chat - 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: Team chat (
/showthread.php?tid=288310)
Team chat -
[GOD]Dragonster82 - 07.10.2011
Error:
PHP код:
error 001: expected token: "]", but found ")"
pawn Код:
public OnPlayerText(playerid, text[])
{
if(text[0] == '@')
{
new Pname[24], string[150];
GetPlayerName(playerid, Pname, 24);
format(string, sizeof(string), "|TEAM CHAT| %s(%d): %s", Pname, playerid, text[1]);
for(new i; i<MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
if(PoliceRank[playerid] >= PoliceRank[i] || (GangRank[playerid >= GangRank[i])
SendClientMessage(i, -1, string);
}
return 0;
}
return 1;
}
Error Area:
pawn Код:
if(PoliceRank[playerid] >= PoliceRank[i] || (GangRank[playerid >= GangRank[i])
Re: Team chat -
$India$ - 07.10.2011
pawn Код:
if(PoliceRank[playerid] >= PoliceRank[i] || (GangRank[playerid] >= GangRank[i])
Re: Team chat -
[GOD]Dragonster82 - 07.10.2011
Quote:
Originally Posted by $India$
pawn Код:
if(PoliceRank[playerid] >= PoliceRank[i] || (GangRank[playerid] >= GangRank[i])
|
You're just copy-pasting, no difference.
Re: Team chat -
[Diablo] - 07.10.2011
Quote:
Originally Posted by [GOD]Dragonster82
You're just copy-pasting, no difference.
|
lol no check again?
you were missing "]" after second playerid on that line.
Re: Team chat -
aRoach - 07.10.2011
pawn Код:
if(PoliceRank[playerid] >= PoliceRank[i] || (GangRank[playerid] >= GangRank[i]))
You missed a
)
Re: Team chat -
[GOD]Dragonster82 - 07.10.2011
Quote:
Originally Posted by aRoach
pawn Код:
if(PoliceRank[playerid] >= PoliceRank[i] || (GangRank[playerid] >= GangRank[i]))
You missed a )
|
Thank you so much sir.
Re: Team chat -
$India$ - 07.10.2011
Np..