[Tutorial] Using bit arrays in PAWN
#3

Can I ask why does when I use new Text:Library[MAX_PLAYERS char] = { Text:INVALID_TEXT_DRAW, ...};

and later

pawn Код:
for(new playerid; playerid < MAX_PLAYERS; playerid++)
    {
        Library[playerid] = TextDrawCreate(301.000000, 300.000000, "Library~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~");
...
    }
It says

[19:49:16] [debug] Run time error 4: "Array index out of bounds"
[19:49:16] [debug] Accessing element at index 29 past array upper bound 28


Whats so special about that char and where I can read more about it?

Its like Library[MAX_PLAYERS] would have just 29 cells
Reply


Messages In This Thread
Using bit arrays in PAWN - by Emmet_ - 24.01.2014, 16:02
Re: Using bit arrays in PAWN - by Patrick - 24.01.2014, 16:12
Re: Using bit arrays in PAWN - by ikey07 - 24.01.2014, 16:43
Re: Using bit arrays in PAWN - by Emmet_ - 24.01.2014, 16:47
Re: Using bit arrays in PAWN - by Patrick - 24.01.2014, 16:51
Re: Using bit arrays in PAWN - by ikey07 - 24.01.2014, 17:21
Re: Using bit arrays in PAWN - by RaeF - 03.05.2015, 02:52
Re: Using bit arrays in PAWN - by Vince - 03.05.2015, 09:43

Forum Jump:


Users browsing this thread: 1 Guest(s)