SA-MP Forums Archive
must be lvalue (non-constant) problem in IF Statement. - 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: must be lvalue (non-constant) problem in IF Statement. (/showthread.php?tid=567844)



must be lvalue (non-constant) problem in IF Statement. - NinjahZ - 17.03.2015

Код:
error 022: must be lvalue (non-constant)
Код:
else if(!PlayerInfo[playerid][pAdmin] >= 1 && (!PlayerInfo[playerid][pAdmin] = 2 && (!PlayerInfo[playerid][pAdmin] = 3 && (!PlayerInfo[playerid][pAdmin] = 4 && (!PlayerInfo[playerid][pAdmin] = 1337 && (!PlayerInfo[playerid][pAdmin] = 1338 && (!PlayerInfo[playerid][pAdmin] = 99999)
I ain't really good with &&, | | I knew I was gonna get errors, but not exactly sure on how to fix it..... code looked fine to me XD



Re: must be lvalue (non-constant) problem in IF Statement. - X337 - 17.03.2015

Код:
else if(!PlayerInfo[playerid][pAdmin] >= 1 && (!PlayerInfo[playerid][pAdmin] == 2 && (!PlayerInfo[playerid][pAdmin] == 3 && (!PlayerInfo[playerid][pAdmin] == 4 && (!PlayerInfo[playerid][pAdmin] == 1337 && (!PlayerInfo[playerid][pAdmin] == 1338 && (!PlayerInfo[playerid][pAdmin] == 99999)
Change = to ==


Re: must be lvalue (non-constant) problem in IF Statement. - NinjahZ - 17.03.2015

Awe, fudge :P thank you for that ++