What line is the error on? Where is the index given a value?
The Normal for loop continuation condition should be for while the index is LESS than the size of the array.
Remember array indexes...