Null error that makes no sense to me

So, I have received the following error: Blueprint Runtime Error: “Accessed None trying to read property CallFunc_Array_Get_Item_2”. Node: Branch Graph: EventGraph Function: Execute Ubergraph NPC Dave Johnson Customer 2A Blueprint: NPC_DaveJohnson_Customer_2A

Followed by this error: Blueprint Runtime Error: “Accessed None reading structure QuestName_15_E0E8403840EEF84FC9BD74A537F2FEE9”. Node: Branch Graph: EventGraph Function: Execute Ubergraph NPC Dave Johnson Customer 2A Blueprint: NPC_DaveJohnson_Customer_2A

Both errors seem to have to do with this section of nodes:


Specifically, the branch node. Not sure why I’m receiving the errors, because during play the function performs without issue.

Providing it is the Branch doing the complaining here, it’s probably complaining about an invalid reference to this:

Well, again, that doesn’t totally make sense to me, but maybe. What do you think?

that doesn’t totally make sense to me

  • is there more than 1 instance of BP player?
  • validate those array elements before the Branch gets the chance to evaluate it

There is only one instance of BP_Player. As far as validating the array elements, not sure what you mean. Do they require an IsValid?

Just in case at some point they are, indeed, invalid. We do not know how you call it. What are the chances this script is called when one of the array elements is / becomes invalid?

Let’s say you had a quest (component?), destroyed it but forgot to remove it from the array. The For Each Loop would try to access data that no longer exists, throwing an error.

Added the IsValid check, but the error remains.

validate those array elements before the Branch gets the chance to evaluate it

Validate all of them, not 0. The error points to element 2, for example.

1 Like

That was it! Amazing! Thank you so much!

1 Like

Do note this means you DO have an invalid element in that array. This may come back and bite you.

Right! However, I’m not sure what that invalid element would be. Utterly confusing.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.