I have this:
Code:
#define TOTALLEVELS 12
new gEnt
new const Levels[TOTALLEVELS] =
{
0,
50,
100,
200,
300,
500,
750,
1000,
1250,
1500,
1750,
2000
}
new const LevelNames[TOTALLEVELS][] =
{
"NewBie",
"Beginner",
"Learning",
"Advanced",
"Ultimate",
"Kniffer",
"Killer",
"freak",
"PRO",
"Veteran",
"Respected",
"Matrix"
}
and this:
Code:
if( get_user_points(id) >= Levels[gLevel[id]] )
{
gLevel[id]++;
}
The line that makes the error is:
Code:
if( get_user_points(id) >= Levels[gLevel[id]] )
Its over the 2000 and makes the index out of bounds errors.
How to fix and if points of user is over 2000 to make last level without index out of bounds?