Get (a copy) from array does not trigger an error if you Get an index that does not exist

Get (a copy) from array does not trigger an error if you Get an index that does not exist. For example if you make a boolean array with 2 booleans, then try to Get index 3 (which is not in the array) it will just happily say “false” and move on. This can make things silently fail which isn’t good.

If you do the same thing with Get (a ref) it gives an error: Blueprint Runtime Error: Attempted to access index 3 from array BoolArray of length 2! from function: ‘ExecuteUbergraph_SK_Mannequin_Blueprint’ from node: Print String in graph: EventGraph in object: SK_Mannequin_Blueprint with description: Attempted to access index 3 from array BoolArray of length 2!

It seems like Get (a copy) on an index that doesn’t exist is giving the default value instead of giving the same error as Get (a ref).

You don’t get notified immediately if you are out of bounds of an array in BP. You can see the error in the log which is located in the tabs Window->DeveloperTools->OutputLog.

You don’t even get an error when using Get (a copy). Which is the bug. :stuck_out_tongue:

You get an OutputLog warning when fetching a copy and a proper Runtime error when getting a reference.
Never bothered me personally as I keep the log running at all times but yeah, the behaviour is somewhat inconsistent.

I would not mind getting a proper Runtime error in both cases, tbh.