error 008: must be a constant 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 008: must be a constant expression; assumed zero (
/showthread.php?tid=372657)
error 008: must be a constant expression; assumed zero -
ShawnMiller1337 - 27.08.2012
pawn Код:
else if{PlayerInfo[playerid][pFlyTut] = 1 && IsAFAAPlane(vehicleid))
{
SendClientMessageEx(playerid, COLOR_ALLDEPT,"You have entered a FAA Tutorial Plane, Please keep your speed and keep to the markers!");
}
The top line ? Giving me an error
Re: error 008: must be a constant expression; assumed zero -
Kindred - 27.08.2012
Код:
else if{PlayerInfo[playerid][pFlyTut] = 1 && IsAFAAPlane(vehicleid))
What the fuck is that there for? That is most certainly NOT a parenthese.
Correct:
pawn Код:
else if(PlayerInfo[playerid][pFlyTut] = 1 && IsAFAAPlane(vehicleid))
Re: error 008: must be a constant expression; assumed zero -
fiki574 - 27.08.2012
Quote:
Originally Posted by ShawnMiller1337
pawn Код:
else if{PlayerInfo[playerid][pFlyTut] = 1 && IsAFAAPlane(vehicleid)) { SendClientMessageEx(playerid, COLOR_ALLDEPT,"You have entered a FAA Tutorial Plane, Please keep your speed and keep to the markers!"); }
The top line ? Giving me an error
|
Quote:
Originally Posted by Kindred
Код:
else if{PlayerInfo[playerid][pFlyTut] = 1 && IsAFAAPlane(vehicleid))
What the fuck is that there for? That is most certainly NOT a parenthese.
Correct:
pawn Код:
else if(PlayerInfo[playerid][pFlyTut] = 1 && IsAFAAPlane(vehicleid))
|
Both wrong! Usage of "=" in "if" declarations must be like this:
pawn Код:
else if(PlayerInfo[playerid][pFlyTut] == 1 && IsAFAAPlane(vehicleid))
And yea, replace "{" with "("!