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)
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?
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.
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.