error 032: array index out of bounds
#1

pawn Код:
error 032: array index out of bounds (variable "RandomPizzaTimer")
pawn Код:
new RandomPizzaTimer[][] =
{
    {15, 0},
    {15, 0},
    {15, 0},
    {15, 0},
    {15, 0}
};
new Random = random(sizeof(RandomPizzaPoints));
vPlayer[playerid][pPizzaData] = Random;

GivePlayerMoney(playerid, RandomPizzaTimer[vPlayer[playerid][pPizzaData]][2]);//Error Line
Any idea? It might be solved with a enum? Thanks...
Reply
#2

You are trying to access the second index in the array, which is invalid. Array indexes start from 0.

pawn Код:
GivePlayerMoney(playerid, RandomPizzaTimer[vPlayer[playerid][pPizzaData]][1]);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)