01.09.2010, 23:38
This is my command:
I get this error:
The line is:
pawn Код:
if (strcmp(cmd, "/gms", true) == 0)
{
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, COLOR_WHITE,"_____________________________________________");
SendClientMessage(playerid, COLOR_GREY," EV-RP GM Team ");
foreach (Player,i)
{
if(gPlayerLogged[i])
{
if(PlayerInfo[i][pHelper] == 1)
{
GetPlayerName(i, sendername, sizeof(sendername));
GiveNameSpace(sendername);
if(HelperDuty[i] == 0)
{
format(string, 256, "GM: %s",sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
}
else
{
format(string, 256, "GM: %s (on duty)" ,sendername);
SendClientMessage(playerid, 0x00808000, string);
}
else if(PlayerInfo[i][pHelper] == 2)
{
GetPlayerName(i, sendername, sizeof(sendername));
GiveNameSpace(sendername);
if(HelperDuty[i] == 0)
{
format(string, 256, "Lead GM: %s",sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
}
else
{
format(string, 256, "Lead GM: %s (on duty)" ,sendername);
SendClientMessage(playerid, 0x00808000, string);
}
}
}
}
}
}
SendClientMessage(playerid, COLOR_WHITE,"_____________________________________________");
return 1;
}
Код:
(23354) : error 001: expected token: ";", but found "if"
pawn Код:
else if(PlayerInfo[i][pHelper] == 2)