1 / 1 / 0
Регистрация: 31.03.2022
Сообщений: 28
|
||||||
1 | ||||||
Как исправить IndexOutOfRangeException: Index was outside the bounds of the array01.04.2022, 13:14. Показов 2675. Ответов 2
Возникает такая ошибка IndexOutOfRangeException: Index was outside the bounds of the array.
Character+<play>d__4.MoveNext () (at Assets/Scripts/Character.cs:21) UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <d3b66f0ad4e34a55b6ef91ab84878193>:0) UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator) Character:Start() (at Assets/Scripts/Character.cs:14)
0
|
01.04.2022, 13:14 | |
Ответы с готовыми решениями:
2
IndexOutOfRangeException: Index was outside the bounds of the array IndexOutOfRangeException: Index was outside the bounds of the array System.IndexOutOfRangeException Index was outside the bounds of the array System.IndexOutOfRangeException: Index was outside the bounds of the array |
95 / 60 / 36
Регистрация: 07.08.2013
Сообщений: 241
|
||||||
01.04.2022, 13:47 | 2 | |||||
у вас [i] не ограничено длинной массива
0
|
565 / 362 / 208
Регистрация: 18.10.2019
Сообщений: 1,231
|
||||||
01.04.2022, 20:09 | 3 | |||||
defoh, судя по всему возникает ситуация, когда в массиве нет объекта, который бы противоречил этому условию:
Чтобы избежать ошибки, можно написать так:
0
|
01.04.2022, 20:09 | |
01.04.2022, 20:09 | |
Помогаю со студенческими работами здесь
3
IndexOutOfRangeException: Index was outside the bounds of the array. (ошибка в коде) Ошибка - Runtime exception: System.IndexOutOfRangeException: Index out of the bounds of the array Выдает такую ошибку IndexOutOfRangeException: Index was outside the bounds of the array. Бьюсь уже 3 час над решением Ошибка Index was outside the bounds of the array. Как исправить? Ошибка System.IndexOutOfRangeException: "Index was outside the bounds of the array" Ошибка System.IndexOutOfRangeException: "Index was outside the bounds of the array" Искать еще темы с ответами Или воспользуйтесь поиском по форуму: |