- Home /
What means this error ?
hi,
I get this error it is in one of my previous questions ;
What does it means ?,
IndexOutOfRangeException: Array index is out of range.
Answer by by0log1c · Apr 20, 2011 at 09:27 PM
You're trying to access an invalid index from a container-type variable(List/Array/Hashtable). Either the 'container' isn't initialized or you're reaching for a non-int, or a negative int. In any case, the problem is you're calling an inexistant value.
or you are trying to go above the bounds of the array itself. Array of 5 objects but your trying to read index 10 for example.
People often have an off-by-one error. $$anonymous$$ind that an array has a range starting with 0. So an array of 3 has index: 0,1,2. 3 is already OutOfBounds.
Without seeing the code that produces this error, there's nothing else to add ;)
Your answer
Follow this Question
Related Questions
Wierd Animation Bug 0 Answers
Array index is out of range and Raycast question 0 Answers
array problem index out of range ? why ? 2 Answers
IndexOutOfRangeException: Array index is out of range. 0 Answers