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=581837)
error 008: must be a constant expression; assumed zero -
AnoTek - 15.07.2015
I made a level up and payday system and i've got some errors
(55) : error 017: undefined symbol "PlayerInfo"
Line :
Код:
new nxtlevel = PlayerInfo[playerid][pLevel]+1;
(55) : error 008: must be a constant expression; assumed zero
Line:
Код:
new nxtlevel = PlayerInfo[playerid][pLevel]+1;
(56) : error 008: must be a constant expression; assumed zero
Line:
Код:
new expamount = nxtlevel*levelexp;
How can i solved it?
Re: error 008: must be a constant expression; assumed zero -
notime - 15.07.2015
Quote:
Originally Posted by AnoTek
I made a level up and payday system and i've got some errors
(55) : error 017: undefined symbol "PlayerInfo"
Line :
Код:
new nxtlevel = PlayerInfo[playerid][pLevel]+1;
(55) : error 008: must be a constant expression; assumed zero
Line:
Код:
new nxtlevel = PlayerInfo[playerid][pLevel]+1;
(56) : error 008: must be a constant expression; assumed zero
Line:
Код:
new expamount = nxtlevel*levelexp;
How can i solved it?
|
By copy and pasting the definition playerinfo and enum for the script you got this from.
Re : error 008: must be a constant expression; assumed zero -
KillerDVX - 16.07.2015
Add this on top :
PHP код:
enum pInfo
{
pLevel
};
new PlayerInfo[MAX_PLAYERS][pInfo];