# Switch statement failed to match case for index property

**URL:** <https://forums.unrealengine.com/t/switch-statement-failed-to-match-case-for-index-property/484956>\
**Category:** Platform & Builds\
**Tags:** Switch, unreal-engine, question\
**Created:** [June 16, 2021, 12:27am UTC](https://forums.unrealengine.com/t/switch-statement-failed-to-match-case-for-index-property/484956 "2021-06-16T00:27:50Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xenon2112](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Xenon2112](https://forums.unrealengine.com/u/Xenon2112)\
**Post date:** [June 16, 2021, 12:27am UTC](https://forums.unrealengine.com/t/switch-statement-failed-to-match-case-for-index-property/484956/1 "2021-06-16T00:27:50Z")

</div>

I’m getting an error, just wondering if anyone’s familiar with this:

LogScript: Warning: Switch statement failed to match case for index property Temp\_int\_Variable73  
PC[controllerClass]\_C /Game/Levels/MoonLandscape/Maps/Overview/UEDPIE\_0Moon.Moon:PersistentLevel.PC[controllerclass]_C0  
Function /Game/Framework/PC[controllerClass].PC_[controllerClass]\_C:ExecuteUbergraphPC[controllerClass]:61B70

I seem to get this warning many multiple times per frame, immediately, and without fail, and consistently. is there anything I can glean from the code at the end of the Ubergraph portion of the warning?

I have a bunch of switches and I have no idea what Temp\_int\_Variable\_XX might be (the number changes)

---

<div class="post-metadata">

**Author:** ![Xenon2112](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Xenon2112](https://forums.unrealengine.com/u/Xenon2112)\
**Post date:** [June 16, 2021, 12:54am UTC](https://forums.unrealengine.com/t/switch-statement-failed-to-match-case-for-index-property/484956/2 "2021-06-16T00:54:09Z")

</div>

I’ve gone through this [controllerClass] and added a debug print for the output log to every single switch node in the class. I found that two of them were ticking, and unplugging execution from those two nodes didn’t solve anything.

Is a switch statement called in one of the basic macros? Is there any other place one might be?

---

<div class="post-metadata">

**Author:** ![Kehel18](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kehel18](https://forums.unrealengine.com/u/Kehel18)\
**Post date:** [June 16, 2021, 3:54pm UTC](https://forums.unrealengine.com/t/switch-statement-failed-to-match-case-for-index-property/484956/3 "2021-06-16T15:54:00Z")

</div>

Hello! Can you share nodes graph?

---

<div class="post-metadata">

**Author:** ![Xenon2112](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Xenon2112](https://forums.unrealengine.com/u/Xenon2112)\
**Post date:** [June 16, 2021, 10:28pm UTC](https://forums.unrealengine.com/t/switch-statement-failed-to-match-case-for-index-property/484956/4 "2021-06-16T22:28:27Z")

</div>

Hey, this is a class with I think five different graphs as well as tons of macros and collapsed nodes. Luckily I’ve figured it out, and I appreciate your help. I’m going to post the solution momentarily.

---

<div class="post-metadata">

**Author:** ![Xenon2112](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Xenon2112](https://forums.unrealengine.com/u/Xenon2112)\
**Post date:** [June 16, 2021, 10:36pm UTC](https://forums.unrealengine.com/t/switch-statement-failed-to-match-case-for-index-property/484956/5 "2021-06-16T22:36:16Z")

</div>

So, I’ve figured this out, and I will take you through the whole process. But in case you want the simple answer and you know how to troubleshoot, what was leading to this particular message was a Select based on Int, which was provided from a find node, which sometimes sent -1.

So initially I added a print statement to every Switch node, and then discovered that two of them were being called every frame, and I disconnected those two, and still got the warning messages, so I knew that wasn’t it.

I then basically went poking around disconnecting various things throughout the different graphs (Ubergraph includes all nodes (non functions, not sure about macros) from ALL graphs. Before too long I was able to narrow it down to the main gameplay loop, and then to where the player controller was setting input data that was to be sent to the pawn.

I continued a pseudo-binary search until I narrowed it down to a particular macro (that was called a bunch of times in the set input data nodes) which was asking whether a particular input axis was found in a bindings map. The result of the find node was plugged in to a select node based on int, which led to the float value of the particular axis. Now, when the axis was not found in the binding map, it returned a -1 value which was not represented on the select node. So I just added 1 to the int value and bumped all of the values I had plugged in down one, problem solved.

---

<div class="post-metadata">

**Author:** ![WondersoftStudio](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WondersoftStudio](https://forums.unrealengine.com/u/WondersoftStudio)\
**Post date:** [June 23, 2025, 2:53pm UTC](https://forums.unrealengine.com/t/switch-statement-failed-to-match-case-for-index-property/484956/6 "2025-06-23T14:53:35Z")

</div>

> [@Xenon2112](#):
>
> was a **Select** based on Int, which was provided from a find node, which sometimes sent -1

i.e. Select node is receiving an input outside of its list.

This should be the accepted answer. Thanks!

---

<div class="post-metadata">

**Author:** ![Idene\_Roozbayani](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Idene\_Roozbayani](https://forums.unrealengine.com/u/Idene_Roozbayani)\
**Post date:** [March 18, 2026, 7:41pm UTC](https://forums.unrealengine.com/t/switch-statement-failed-to-match-case-for-index-property/484956/7 "2026-03-18T19:41:50Z")

</div>

Mate you just helped a ton. Thanks so much 😃

---

<div class="post-metadata">

**Author:** ![DragonRelt](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dragonrelt/32/1075747_2.png) [@DragonRelt](https://forums.unrealengine.com/u/DragonRelt)\
**Post date:** [April 9, 2026, 2:58am UTC](https://forums.unrealengine.com/t/switch-statement-failed-to-match-case-for-index-property/484956/8 "2026-04-09T02:58:31Z")

</div>

Years later this is still helping, thanks!
