I have an array that updates whenever the character is seen by AI Perception and works perfectly fine if i just print the length of the array (So if one enemy can see the player, it prints 1… etc) but im trying to check if it is empty (so no enemies can see) and if they can’t see then spawn another actor at the location. I have tried doing this but everytime an enemy sees the player, it crashes with this error:
Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Containers\Array.h] [Line: 691] Array index out of bounds: 0 from an array of size 0
Update: seems to be that removing that actor that spawns after a delay also causes the same crash so I’m gussing its the Destroy Actor that is the issue
That maybe it. But the crash would still happen whenever i open the blueprint for the actor that was being spawned. The onlything in the blueprint is a skeletal mesh, nothing in the event graph
How do I find a line number to resolve a crash I am having, something is
Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Containers\Array.h] [Line: 691] Array index out of bounds: 18 from an array of size 18
When is this crash happening? During project start-up or when you try to play in editor? If is editor, try to ‘cook’ your content, so more messages and warnings will appear in the output log. Try to create a new topic to start a new conversation.