invalid expression, assumed zero. - 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: invalid expression, assumed zero. (
/showthread.php?tid=260640)
invalid expression, assumed zero. -
Force_ - 10.06.2011
Basically, I'm scripting a GM and I got this error.
Код:
(10691) : error 029: invalid expression, assumed zero
pawn Код:
SendClientMessage(playerid, WHITE, "You can't talk ICly whilst you're spectating.");
}
}
else //10691
{
SendClientMessage(playerid, WHITE, "You may not speak ICly whilst you're in OOC prison.");
}
}
}
}
return 0;
}
Can anyone fix it?
Re: invalid expression, assumed zero. -
JaTochNietDan - 10.06.2011
Where's the preceding if statement for that else statement? Are you sure your brackets are correct?
Re: invalid expression, assumed zero. -
Force_ - 10.06.2011
pawn Код:
if(strlen(text) >= 128)
{
SendClientMessage(playerid, WHITE, "Your message must be shorter than 128 characters.");
}
else
{
if(Player[playerid][PrisonID] != 1)
{
if(Spectator[playerid][SpecSpectatingPlayer] == -1)
{
format(string, sizeof(string), "[%s Accent] %s says: %s", Player[playerid][Accent], GetName(playerid), text);
NearByMessage(playerid, RED, string);
ICChatLog(string);
}
else
{
format(string, sizeof(string), "[%s Accent] %s says: %s", Player[playerid][Accent], GetName(playerid), text);
NearByMessage(playerid, WHITE, string);
ICChatLog(string);
}
}
else
{
SendClientMessage(playerid, WHITE, "You can't talk ICly whilst you're spectating.");
}
}
else
{
SendClientMessage(playerid, WHITE, "You may not speak ICly whilst you're in OOC prison.");
}
}
}
}
return 0;
}
Re: invalid expression, assumed zero. -
Force_ - 10.06.2011
EDIT: Double Post, Delete.
Re: invalid expression, assumed zero. -
Force_ - 10.06.2011
Bump.
Re: invalid expression, assumed zero. -
PCheriyan007 - 10.06.2011
What I see here is that there are more 'else' than 'if' statements.