what do there erroes mean and how do i fix them

Blueprint Runtime Error: “Accessed None”. Node: Set World Rotation Graph: EventGraph Function: Execute Ubergraph BP Base Enemy Blueprint: BP_BaseEnemy

Blueprint Runtime Error: “Attempted to access BP_ThirdPersonCharacter_C_0 via property BP Third Person Character, but BP_ThirdPersonCharacter_C_0 is not valid (pending kill or garbage)”. Node: Return Node Graph: GetHealthBarProgress Function: Get Health Bar Progress Blueprint: WBP_PlayerHUD

@SupportiveEntity

becue i have tried everything i could think of to fix them but i dont really know what i am doing

It means your referencing something that is no longer valid. It’s good practice to always run a hard reference through an IsValid node.

what do thoes do

and how do i make the references vaild

@ruffhaus

They are a way of protecting you from calling a null reference.

For example if you stored a reference to a character in your game by casting to that character and then storing that cast value in a variable so that you can get info from it later, if you were then to destroy that character, it is (eventually) removed from memory so you can no longer get that exact references data. So the IsValid stops you from running the logic on a bad reference.

If the reference has become invalidated it is because it no longer exists, or it is about to not exist. So you need to look into why that is? Is the referenced object being destroyed? (sounds like it from your example) So why do you need a reference to it? If it shouldn’t be being destroyed you need to examine that part of your logic.

i am trying to reference to player character are the errors from when he died though he keeps dying intently whenever i stat the game plus before he started doiung that all the enemy wiuld one shot him

also how would you implment a null reference into my blueprints

just tested by making it so my guy cant die yeah it just get mad when he dies is there anyone way to stop the errors if he gets destroyed or is that just somthing i have to live with

@ruffhaus

Once he dies that reference is also dead, if you spawn a new character you need to make a reference to the new one.

i have got to respawnign yet havent even figured out healthbars yet the game is going a bit wrong but should i just ignore the error until i am able to respawn a new charecter

Yeah so if you put in the IsValid checks anywhere you have that reference you won’t get errors, but the logic beyond the check will be gated off

i have a question for spots like this how would i do the is valid as the end outputs of both of them dont connect to the max and current health as they want a blue imput

It usually depends on what kind of errors you’re seeing. Most of the time, they point to missing references, wrong data types, or build issues. Try checking the Output Log for more details, verify your project files, and rebuild the project. If the problem persists, please share the exact error messages so others can help more accurately.

the exact error messages are the two i posted at the top

right click on the BP_ThirdPersonCharacter node and click ConvertToValidatedGet and then run the execution pin through the IsValid path that will solve any referencing errors in that function.

What it will mean though is that if that reference is not valid the return value of that function will always be 0.