Why is this making an error?


I don’t understand why the top command is making an error. What I’m doing here is opening a Widget when the player is overlapping with the actor. The bottom Widget command opens without any error even if I change the character while the top Widget command opens but with errors and it doesn’t even show up when I change the character. The commands are almost exactly the same except the Widget to open and the actor to interact with. Is this a bug? I’m using UE 5.0.3

You have two events with the “same” name??? When you press ‘E’, which event is supposed to be run??? Logically, when you press ‘E’ when is the top to be run vs. the bottom? Are both to happen on an ‘E’ press?

Yeah, both are bound to press E but the conditions are different that’s why I made a validated get and branch so the Widgets won’t show up unless the conditions are met

I would recommend one ‘E’ event and use a “sequence” block to link these two tasks to that singular event.

image

Didn’t work

What is the specific error message you are getting??? So it compiles fine and you can run your game but when you press the ‘E’ you get an error?

Hey @Akimikage! Yeah you can’t have two of the same event on a blueprint. “E PRESSED” is one event. Try something like this:

1 Like

The error is "Accessed none trying to read proper BW_SelectMap Reference Node : Set Visibility graph : EventGraph function : Execute Ubergraph PZ Character Master Blueprint : PZ Character Master

Still didn’t work :frowning:

The error is claiming that “BWSelectMapRef” is none. Need to fix this or check that this is valid as well.

1 Like

AH you need to make sure your “BW_SelectMap” variable is set! It’s trying to read it but it doesn’t exist yet. Try using CreateWidget ->AddtoViewport first!

Also this! ^^

1 Like

Yes, I already have those two CreateWidget → Promote to Variable/Set on EventBeginPlay. That’s why I’m confused because the bottom Widget is showing up without errors while the other is making an error.

Can you show us the code where you’re doing that? Just in case you missed something little that could throw the whole thing?

I would recommend that you “Find Results” with “BWSelectMapRef” within the BP to search out all instances of this to make sure something isn’t connected incorrectly. The mystery is… …why is BWSelectMapRef undefined/none…

Wait … I need to rearrange the codes so it will be visible at the same time

This is on EvenBeginPlay

Do you need to set “Owning Player” to something??? I do not see the issue or an error.

I don’t think so. The Widgets are not attached to an Actor

That is weird. Maybe add a validated get after the BWSelectMapRef set and direct the “Is Not Valid” path to a print statement. You shouldn’t get to the print statement; however, something is causing the BWSelectMapRef to be none…

Is you game multiplayer? Maybe this is a replication issue???