Trying to fix this error...

Blueprint Runtime Error: “Accessed None trying to read property PlayerCharacter BP”. Node: Set Percent Graph: Increase Stamina Function: Increase Stamina Blueprint: BPC_PlayerStats

Hi!

As you can see in the error text, you’re trying to read property of PlayerCharacter BP while it’s not set to anything. You need to assign something to it prior to accessng it.
If you are assigning it, then you probably trying to access too early (or assigning it too late).

Can you, please, provide your blueprints where this error occures and where you assign your PlayerCharacter BP?

Hey!

Thank you so much for you’re reply! :slight_smile: These are my blueprints i think the problem lays.



Blueprint that sets player character seems fine to me.

Error also says about “Increase Stamina” function. I suppose, it looks the same as “Decrease Stamina” that you’ve posted?

When do you call “Increase Stamina” function? Assuming that “Decrease Stamina” and “Increase Stamina” work similarly, then error text tells about this logic part:

Seems like that this function is being called too early.

How can I fix this? Sorry I am following a tutorial, so i wouldn’t know how to do this.

I think of two ways

  1. Add checking for valid PlayerCharacter BP inside “Decrease Stamina” and “Increase Stamina” (you can use IsValid node for that).
  2. Look where this function being called and understand why PlayerCharacter BP is not set at the moment they are called.

Also, what tutorial you are following, maybe we can look for problem there.

Thank you so much, i have been following this tutorial series.

After episode 6 (near the end) I got the error.

Can you, please, show logic at “Tick” of your “BP_ThirdPersonCharacter”?

You Mean this?

Yes, this.

Can you increase delay from 0.1 to 1.0 and check, if it helps?

1 Like

Omg This worked! Thank you so much, no errors anymore.
It only showed this:

LogPackageName: Warning: DoesPackageExist called on PackageName that will always return false. Reason: Input ‘’ was empty.

But that didn’t show as an error so i think all is good now :slight_smile:

1 Like

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