error 022: must be lvalue (non-constant) - 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 022: must be lvalue (non-constant) (
/showthread.php?tid=367215)
error 022: must be lvalue (non-constant) -
ridho27 - 09.08.2012
Error
D:\serverGTA\SERVER-BARU\gamemodes\vx-rp.pwn(2201) : error 022: must be lvalue (non-constant)
On line 2201
foreach(Player, x) {
Re: error 022: must be lvalue (non-constant) -
ridho27 - 09.08.2012
D:\serverGTA\SERVER-BARU\gamemodes\vx-rp.pwn(2201) : error 001: expected token: ";", but found ")"
D:\serverGTA\SERVER-BARU\gamemodes\vx-rp.pwn(2201) : error 029: invalid expression, assumed zero
its error on same line
Re: error 022: must be lvalue (non-constant) -
ridho27 - 09.08.2012
public playerTabbedLoop() {
foreach(Player, x) {
if(playerVariables[x][pTabbed] == 0 && IsValidDynamic3DTextLabel(playerVariables[x][pAFKLabel]))
DestroyDynamic3DTextLabel(playerVariables[x][pAFKLabel]);
playerVariables[x][pConnectedSeconds] += 1;
if(playerVariables[x][pConnectedSeconds] < gettime()-1 && playerVariables[x][pTabbed] != 1 && playerVariables[x][pConnectedSeconds] >= 5 && GetPlayerState(x) != 9 && GetPlayerState(x) != 0 && GetPlayerState(x) != 7) {
playerVariables[x][pTabbed] = 1;
playerVariables[x][pAFKLabel] = CreateDynamic3DTextLabel("Paused.", COLOR_RED, 0, 0, 0, 7.5, x, _, 1, _, _, _, 7.5);
}
}
return 1;
}
Re: error 022: must be lvalue (non-constant) -
[GO]Hardstyle - 09.08.2012
You are doing a constant- not a value .-