# Control rig says index out of bounds, but if I print the index going into it, it is never the number 2 which it says is the issue

**URL:** <https://forums.unrealengine.com/t/control-rig-says-index-out-of-bounds-but-if-i-print-the-index-going-into-it-it-is-never-the-number-2-which-it-says-is-the-issue/2121571>\
**Category:** Character & Animation\
**Tags:** unreal-engine, question\
**Created:** [November 14, 2024, 3:07am UTC](https://forums.unrealengine.com/t/control-rig-says-index-out-of-bounds-but-if-i-print-the-index-going-into-it-it-is-never-the-number-2-which-it-says-is-the-issue/2121571 "2024-11-14T03:07:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Soul\_Gatherer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Soul\_Gatherer](https://forums.unrealengine.com/u/Soul_Gatherer)\
**Post date:** [November 14, 2024, 3:07am UTC](https://forums.unrealengine.com/t/control-rig-says-index-out-of-bounds-but-if-i-print-the-index-going-into-it-it-is-never-the-number-2-which-it-says-is-the-issue/2121571/1 "2024-11-14T03:07:51Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/8/c/a8cdddd601985b224829dbd2a0004ee7c69f99df.jpeg)  
Let me know if I can give any additional information, currently using unreal 5.3 🙂

---

<div class="post-metadata">

**Author:** ![Soul\_Gatherer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Soul\_Gatherer](https://forums.unrealengine.com/u/Soul_Gatherer)\
**Post date:** [November 14, 2024, 3:38am UTC](https://forums.unrealengine.com/t/control-rig-says-index-out-of-bounds-but-if-i-print-the-index-going-into-it-it-is-never-the-number-2-which-it-says-is-the-issue/2121571/2 "2024-11-14T03:38:33Z")

</div>

Wanted to add some more info, it seems that whenever I add an at node now it will throw this error like in the picture below, even though index says 0 ☹

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/e/3/2e3d3e0cb2215085fdf300a6e807aa3389b51bac.png)

---

<div class="post-metadata">

**Author:** ![leavitodeaver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@leavitodeaver](https://forums.unrealengine.com/u/leavitodeaver)\
**Post date:** [March 22, 2025, 8:45am UTC](https://forums.unrealengine.com/t/control-rig-says-index-out-of-bounds-but-if-i-print-the-index-going-into-it-it-is-never-the-number-2-which-it-says-is-the-issue/2121571/3 "2025-03-22T08:45:24Z")

</div>

Did you ever find a resolution to this? I’m experiencing a similar error, can’t get the control rig to compile because it claims there are several arrays “out of bounds”

---

<div class="post-metadata">

**Author:** ![leavitodeaver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@leavitodeaver](https://forums.unrealengine.com/u/leavitodeaver)\
**Post date:** [March 27, 2025, 2:09am UTC](https://forums.unrealengine.com/t/control-rig-says-index-out-of-bounds-but-if-i-print-the-index-going-into-it-it-is-never-the-number-2-which-it-says-is-the-issue/2121571/4 "2025-03-27T02:09:46Z")

</div>

For anyone curious about this in the future, just make sure you initialize the array with the maximum number of indices you use in the default value. I was manually setting the length of the array in a loop under the Forward Solve event, but it only stopped giving me a compile error after I added 6 blank values as default.
