What could cause these errors in CMD?
#1

[debug] Run time error 4: "Array index out of bounds"
[debug] Attempted to read/write array element at index 1000 in array of size 1000
[debug] AMX backtrace:
[debug] #0 00006100 in ?? (178968, 1128792064) from MM.amx
[debug] #1 000071fc in main (0, 162864) from MM.amx
Reply
#2

PHP код:
[debugRun time error 4"Array index out of bounds"
[debugAttempted to read/write array element at index 1000 in array of size 1000 
You created an array

PHP код:
new array[1000]; 
this array has 1000 cells.
array[1000] means that this symbol's cells go from 0 to 999.

Trying to write/read over that value will make you go "out of bounds"

Wrong writing
PHP код:
array[1000] = 5// Out of bounds, max is 999 
Wrong reading
PHP код:
printf("%d", array[1000]); // Out of bounds, max is 999 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)