error 008: must be a constant expression; assumed zero
#1

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?
Reply
#2

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.
Reply
#3

Add this on top :

PHP код:
enum pInfo
{
    
pLevel
};
new 
PlayerInfo[MAX_PLAYERS][pInfo]; 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)