Found None Error

Getting the following error,

Blueprint Runtime Error: “Accessed None trying to read property CallFunc_GetPlayerPawn_ReturnValue”. Blueprint: BP_Master_Interactable_Door Function: Player Moving Forward? Graph: PlayerMovingForward? Node: Return Node

I know it is due to something ‘not’ being there, but this blueprint was working without errors 2 hours ago, I duplicated the blueprint it was part of to make a variation of where a child component is attached to control the locking of the door instead of taking a key.
Tried shifting it into the Door master BP in case it was something to do with the function being duplicated across two different BP’s but now the door that wasn’t reporting issues, is.
Reconnected all the pins, dragged in new references to the components etc. no impact.
My guess is I’m getting the player incorrectly?
Any help would be appreciated.

Eh, tricky. Does this spam in the log or triggers only once? Keeps triggering as something else happens? What is this function hooked up to?

If you want to elaborate why door needs to know about the player moving forward, please do! is the player supposed to push the door?

The doors stream levels on interaction and unload when you leave the bounding box, I’m using the players velocity to work out in which direction they are walking from the door to unload the previous room.

They are also physic-like doors so after interaction walking into them pushes them open.

The error message appears in the message log (once per door) just from starting the level.

this is where it is called

Thank you for replying so quickly

When this pops up in the log, you can click on the offending piece of script to get to the right place, usually works ok. Is this the place the editor complains about:

image

Or are there more places this function is called?

No it’s the return node in the function itself, I tried having a local variable in the function to receive the result and feed that into the return node but then the error was referencing the bool I’d recreated so wasn’t even reaching the return node.

I understand that. But since it’s a pure node with no execution wire, something else attempts to pull data from it - here it’s setting the Forward bool, during Event Close Door.

Is this the only place in the entire script where this function is called? I’m trying to identify which part of the script cannot handle it.

My guess is I’m getting the player incorrectly?

On the contrary - there’s nothing wrong with the function itself, it’s about where it’s called.

yup

Could you briefly describe the logic that leads to calling this event? Where is the Pawn when this triggers?

Just to test it quickly, could you place a 1s Delay between the Event Close Door and setting the bool?

Below is the door in question, the inner box controls the player pushing the door open, the outer box has a On End Overlap that checks the actor leaving is the player and if so calls the Close Door event.

The delay seems to have no impact (beyond the delay obviously), and the close door event isn’t called until the player leaves the bounding box, but the error occurs even if I just start and stop the scene without doing anything.

Yeah. THAT makes little sense. So if you search for this function in ALL blueprints:

image

You get only 1 result?


Can you move player start outside the volume?

No idea why this fixed it but realised I’d assigned a reference to the Player Controller in the parent Interactable BP so used that in place of GetPlayerPawn in the Function and it works now (can’t believe I forgot the player reference)

1 Like

Wee! Mystery solved. All that matters.

1 Like

Got 3 references, the Master Door BP and its two children, hadn’t noticed the player start that was a network player that wasn’t being used.

Thank you for the help, no idea how long it would have taken me to stumble across the ‘solution’ with out talking it through with you :slight_smile: