6038 //Airstrike command, Army only, Hoorah! 6039 if(strcmp(cmd, "/air", true) == 0) ( 6040 if(IsPlayerConnected(playerid)) ( 6041 if(IsSpawned[playerid] == 0) ( 6042 SendClientMessage(playerid, COLOR_ERROR, "Your are dead. You cannot use this command"); 6043 return 1; 6044 ) 6045 if(gTeam[playerid] != TEAM_ARMY) ( 6046 SendClientMessage(playerid, COLOR_ERROR, "This command can only be used by the Army"); 6047 return 1; 6048 )
MEC.pwn(6039 -- 6040) : error 029: invalid expression, assumed zero MEC.pwn(6040) : error 001: expected token: ";", but found ")" MEC.pwn(6040) : error 029: invalid expression, assumed zero MEC.pwn(6040) : fatal error 107: too many error messages on one line
i'm trying to limit a /air command from an Airstrike FS only to TEAM_ARMY
Код:
//Airstrike command, Army only, Hoorah! if(strcmp(cmd, "/air", true) == 0) ( if(IsPlayerConnected(playerid)) ( if(IsSpawned[playerid] == 0) ( SendClientMessage(playerid, COLOR_ERROR, "Your are dead. You cannot use this command"); return 1; ) if(gTeam[playerid] != TEAM_ARMY) ( SendClientMessage(playerid, COLOR_ERROR, "This command can only be used by the Army"); return 1; ) when i tried to do this in the GM it gave me these errors: Код:
MEC.pwn(6039 -- 6040) : error 029: invalid expression, assumed zero MEC.pwn(6040) : error 001: expected token: ";", but found ")" MEC.pwn(6040) : error 029: invalid expression, assumed zero MEC.pwn(6040) : fatal error 107: too many error messages on one line |
if(strcmp(cmd, "/air", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsSpawned[playerid] == 0)
{
SendClientMessage(playerid, COLOR_ERROR, "Your are dead. You cannot use this command");
return 1;
}
if(gTeam[playerid] != TEAM_ARMY)
{
SendClientMessage(playerid, COLOR_ERROR, "This command can only be used by the Army");
return 1;
}
}
//Airstrike command, Army only, Hoorah!
if(strcmp(cmd, "/air", true) == 0) {
if(IsPlayerConnected(playerid)) {
if(IsSpawned[playerid] == 0) {
SendClientMessage(playerid, COLOR_ERROR, "Your are dead. You cannot use this command");
return 1;
}
if(gTeam[playerid] != TEAM_ARMY) {
SendClientMessage(playerid, COLOR_ERROR, "This command can only be used by the Army");
return 1;
}
if(strcmp(cmd, "/air", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsSpawned[playerid] == 0) (
SendClientMessage(playerid, COLOR_ERROR, "Your are dead. You cannot use this command");
return 1;
}
if(gTeam[playerid] != TEAM_ARMY) (
SendClientMessage(playerid, COLOR_ERROR, "This command can only be used by the Army");
return 1;
}