Where did I go wrong? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Where did I go wrong? (
/showthread.php?tid=111895)
Where did I go wrong? -
Tigerbeast11 - 04.12.2009
pawn Код:
public gmend(playerid)
{
if(ninjaskills[playerid] > policekills[playerid] && ninjaskills[playerid] > casinokills[playerid])
{
SendClientMessageToAll(COLOR_ORANGE,"Server: Ninjas have won!");
for new i; i <= MAX_PLAYERS; i++
if(GetPlayerTeam(i) == NINJAS)//Error
{
GivePlayerMoney(i,25000);
SendClientMessage(i,COLOR_ORANGE,"Your team wins!");
}
}
else if(policekills[playerid] > ninjaskills[playerid] && policekills[playerid] > casinokills[playerid])
{
SendClientMessageToAll(COLOR_ORANGE,"Server: Police have won!");
for new i; i <= MAX_PLAYERS; i++
if(GetPlayerTeam(i) == POLICE)//Error
{
GivePlayerMoney(i,25000);
SendClientMessage(i,COLOR_ORANGE,"Your team wins!");
}
}
else if(casinokills[playerid] > policekills[playerid] && casinokills[playerid] > ninjaskills[playerid])
{
SendClientMessageToAll(COLOR_ORANGE,"Server: Casino Workers have won!");
for new i; i <= MAX_PLAYERS; i++
if(GetPlayerTeam(i) == CASINO)//Error
{
GivePlayerMoney(i,25000);
SendClientMessage(i,COLOR_ORANGE,"Your team wins!");
}
}
SetTimer("delay",15000,0);
}
Код:
C:\Documents and Settings\mani\Desktop\Server\gamemodes\test.pwn(84) : error 001: expected token: "do", but found "if"
C:\Documents and Settings\mani\Desktop\Server\gamemodes\test.pwn(94) : error 001: expected token: "do", but found "if"
C:\Documents and Settings\mani\Desktop\Server\gamemodes\test.pwn(104) : error 001: expected token: "do", but found "if"
Re: Where did I go wrong? -
dice7 - 04.12.2009
for (new i; i < MAX_PLAYERS; i++)
Re: Where did I go wrong? -
Tigerbeast11 - 04.12.2009
thnx