Strange macros error in basic code.

Hi, so I have followed a basic tutorial for throwing and picking up rocks. There are two blueprints, the first being the blueprint for the rocks themselves. The second being the blueprint that keeps track of how many rocks the player has which is located in the player blueprint. The problem is that sometimes when I pick up too many rocks at a time the game forgets to add the rock to the variable that keeps track of how many rocks the player has and gives me the following error in the attachment below named: ERROR. One thing to mention is that this tutorial is for UE4 and I’m using it for UE5. Could that be the issue?

Tutorial link: How To Throw A Rock At An Enemy To Stun Them | Pick Up Rocks - Unreal Engine 4 Tutorial - YouTube

Error Image:

Code in rock blueprint:

Code in player blueprint:

One of the problems you have is you’re coming in here

But there’s no guarantee the character variable is valid, an overlap may have been hours ago…

1 Like

I appreciate the help but sadly that didn’t work. Do you know of any other solutions to fix this? If not, do you know of any alternative ways to do this code because it is a really important part of my project. It has something to do with this specific node:

Edit: I noticed that the error has something to do with this specific node in the standard macros blueprint if it helps:

Can you elaborate a bit more. I notice you’re setting the local int, and then setting the parameter int to a copy of that. Is it some sort of test?