PDA

View Full Version : Array index out of bounds


raizo
05/08/2017, 03:31 PM
FIXED. Close please.

ISmokezU
05/08/2017, 03:54 PM
Attempted to read/write array element at index 818 in array of size 800

Maybe if you have this

#define MAX_HOUSES (800)

Change it to:

#define MAX_HOUSES (1000)

Vince
05/08/2017, 04:23 PM
Do not use the primary key as the array index. Auto generated ids do not get re-used and as houses get added and removed those ids will eventually all exceed the array size.

raizo
05/08/2017, 05:48 PM
Thank you both, it has been fixed. +REP