error 029: invalid expression, assumed zero -
BeesSi - 05.01.2015
Hello there, i got here a badge command but i get the following error : error 029: invalid expression, assumed zero, if you could help me i would appreciate it .
pawn Код:
CMD:badge(playerid, params[]) {
if(IsACop(playerid) || PlayerInfo[playerid][pFaction] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pFaction] == 9 || PlayerInfo[playerid][pLeader] == 9)
{
{
PlayerInfo[playerid][pDuty] = 0;
SetPlayerToTeamColor(playerid);
SendClientMessage(playerid, COLOR_WHITE, "You have taken off your badge , you are now off-duty");
}
else
{
PlayerInfo[playerid][pDuty] = 1;
SetPlayerToTeamColor(playerid);
SendClientMessage(playerid, COLOR_WHITE, "You have shown your badge, you are now on-duty");
}
}
return 1;
}
Re: error 029: invalid expression, assumed zero -
BeesSi - 05.01.2015
Any idea what's the problem ?
Re: error 029: invalid expression, assumed zero -
ikkentim - 05.01.2015
please do not bump after just 4 minutes, only bump after 24 hours.
could you tell use which line the error is on?
Re : error 029: invalid expression, assumed zero -
MCZOFT - 05.01.2015
Try this ? i dident test it out im from phone ..
PHP код:
CMD:badge(playerid, params[]) {
if(IsACop(playerid) || PlayerInfo[playerid][pFaction] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pFaction] == 9 || PlayerInfo[playerid][pLeader] == 9)
{
PlayerInfo[playerid][pDuty] = 0;
SetPlayerToTeamColor(playerid);
SendClientMessage(playerid, COLOR_WHITE, "You have taken off your badge , you are now off-duty");
}
else
{
PlayerInfo[playerid][pDuty] = 1;
SetPlayerToTeamColor(playerid);
SendClientMessage(playerid, COLOR_WHITE, "You have shown your badge, you are now on-duty");
}
return 1;
}
Re: error 029: invalid expression, assumed zero -
Vince - 05.01.2015
pawn Код:
CMD:badge(playerid, params[]) {
if(IsACop(playerid) || PlayerInfo[playerid][pFaction] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pFaction] == 9 || PlayerInfo[playerid][pLeader] == 9)
{
// if( ??? ) // Missing here?
{
PlayerInfo[playerid][pDuty] = 0;
SetPlayerToTeamColor(playerid);
SendClientMessage(playerid, COLOR_WHITE, "You have taken off your badge , you are now off-duty");
}
else
{
PlayerInfo[playerid][pDuty] = 1;
SetPlayerToTeamColor(playerid);
SendClientMessage(playerid, COLOR_WHITE, "You have shown your badge, you are now on-duty");
}
}
return 1;
}
Re: error 029: invalid expression, assumed zero -
RockyGamer - 05.01.2015
Maybe this??
pawn Код:
CMD:badge(playerid, params[]) {
* * if(IsACop(playerid) || PlayerInfo[playerid][pFaction] == 3 || PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pFaction] == 9 || PlayerInfo[playerid][pLeader] == 9)
* * {
* * * * PlayerInfo[playerid][pDuty] = 0;
* * * * SetPlayerToTeamColor(playerid);
* * * * SendClientMessage(playerid, COLOR_WHITE, "You have taken off your badge , you are now off-duty");
* }
* else
* {
* * PlayerInfo[playerid][pDuty] = 1;
* * * * SetPlayerToTeamColor(playerid);
* * * * SendClientMessage(playerid, COLOR_WHITE, "You have shown your badge, you are now on-duty");
* * }
* * return 1;
}
Sry for "*", just imagine that they are " ".
Re: error 029: invalid expression, assumed zero -
BeesSi - 05.01.2015
Thank you guys. It fixed.