What are Accessed None errors and how do I fix them?

I continue to get this error over and over, and every-time it seems to pertain to a function node, yet the function has nothing to do with the variable. If I expand the function that the error is being called on, the error goes away and pops up on another unction that has nothing to do with the variable. I have stopped chasing and it is now stuck saying the AddtoViewport function when I create a UMG. I do not see how that variable effects the functions I expanded. Anyone experience this before?

Hi

Accessed None errors are cause by a value that has no info being called.

Looks like “EnemyPlayer” is being set to null. Drag off of “InstigatedBy” and make an “Is Valid” node. Connect that into the execution chain just before setting ‘EnemyPlayer’. I believe that will return false, meaning that you are not passing any information into “InstigatedBy”.

Let me know if that helps.

I am not sure as to why the enemy player variable is getting called. Enemy player is set off of event any damage and the UMG is being spawned when I begin play; Should i set enemy player to something in the editor so it has a value? Im still ny sure as to what enemy player has to do with creating the kill streak hotbar as they do not pertain to each other in any way.
Thanks you,

I am not sure as to why the enemy
player variable is getting called

You are getting it when you set “Enemy Pawn” to the “EnemyPlayer”'s controlled pawn. So “Enemy Pawn” is also empty when you get it to do CheckTeam.

I am not sure what all the Killstreak UMG is connected to, but it looks like it has some reference or binding to the enemy player variable.

What all is bound in the UMG? I’d like to take a look at that one.

Should i set enemy player to something
in the editor so it has a value?

You can try something like that, giving it a player reference.

I will open up the UMG when I get home, but im almost 100% there is no calling to enemy player in it. The umg just pertains to an individual and does have to do with knowing the enemy player or enemy pawn. I noted above that this issue has been chased and by expanding functions the root issues location continued to change by expandig collapsed functions. All of the functions I would expand, from being in a collapsed state in the edittor, had no tie to this variable. I will try a breakpoint when I get home and post a picture of the umg

We got this when our code spawned more than one player that was ‘local’ on the box.

Accessed none errors tend to be rather specific to each project. They are caused by a few certain reference errors, but we’d have to dig into your project further to know the exact cause.

Can you please post a new bug report for this? That will allow us to look into your particular accessed none error better. Thanks!

On another thread in Unreal Answerhub I posted the solution.

and scroll to the bottom.\

It is where a script has crossover between functions.