SA-MP Forums Archive
must be a constant expression;assumed zero - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: must be a constant expression;assumed zero (/showthread.php?tid=660529)



must be a constant expression;assumed zero - Lucas-Fc - 05.11.2018

new a[playerid] = 0;

ta dando erro nessa linha
must be a constant expression;assumed zero

Code:
				new a[] = 0; // funciona ?
				a[playerid] ++;
				if(a[playerid] == 3) return Kick(playerid);
fiz assim e compilou


Re: must be a constant expression;assumed zero - v1k1nG - 05.11.2018

PHP Code:
    new a[MAX_PLAYERS] = 0// vocк perdeu isso, MAX_PLAYERS
    
a[playerid] ++;
    if(
a[playerid] == 3) return Kick(playerid);