SA-MP Forums Archive
error 029: 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)
+--- Thread: error 029: invalid expression, assumed zero (/showthread.php?tid=560940)



error:Invalid expression, assumed zero REP+1 - [S-G]Cypher - 31.01.2015

Lines:
Код:
CMD:fly(playerid, params[])
{
    if (PlayerInfo[playerid][pAdmin] >= 2) {
        new Float:x, Float:y, Float:z;
		if((flying[playerid] = !flying[playerid]))
		{
		    GetPlayerPos(playerid, x, y, z);
		    SetPlayerPos(playerid, x, y, z+5);
      		SetPlayerArmour(playerid, 1000000000.0);
		    SetPlayerHealth(playerid, 1000000000.0);
		    SetTimerEx("AdminFly", 100, 0, "d", playerid);
		}
Error Line:
Код:
if((flying[playerid] = !flying[playerid]))
That all in same line
Код:
error 029: invalid expression, assumed zero
 error 029: invalid expression, assumed zero
 error 029: invalid expression, assumed zero
 fatal error 107: too many error messages on one line
Fix it someone please.. Rep+ for helping


Re: error 029: invalid expression, assumed zero - CalvinC - 31.01.2015

Im not sure what you're trying to achieve.
pawn Код:
if(flying[playerid] == 0);
You can do this to check if the variable is set to 0.


Re: error 029: invalid expression, assumed zero - nezo2001 - 31.01.2015

PHP код:
if((flying[playerid] != flying[playerid]))