Posts: 1,266
Threads: 6
Joined: Oct 2014
PHP код:
new nxtlevel = PlayerInfo[MAX_PLAYERS][pLevel]+1; --------------- Error is here.
instead of MAX_PLAYERS you should use playerid O.O
PHP код:
new nxtlevel = PlayerInfo[playerid][pLevel]+1; --------------- Error is here.
Posts: 850
Threads: 29
Joined: Sep 2014
Reputation:
0
Change that line to:
new nxtlevel = PlayerInfo[playerid][pLevel]+1;
It happened because MAX_PLAYERS is equal to 500. And you created this variable with 500 cells(or whatever u can call it). So the id of those cells are 0,1,2,....499. And there is no cell called 500 so when u tried to get the 500th cell, which does not exist, you got this error.
Posts: 55
Threads: 11
Joined: May 2015
Reputation:
0
Thanks it worked+1 I didnt see that haha.