Why I'm getting variable not in scope error on every blueprint?

From last few days I’m getting variable not in scope error on my variables in every blueprints which causes the funtions not work. Can anyone please solve this problem?

The variable will only be in scope if you add a breakpoint and step over it. You could add a watch to the variable but watches can be a bit dodgy.

Print string is the most reliable tool.

I tried using print string but it didn’t work, I think so this problem is associated with my character, is there any other way?

Add a printstring and breakpoint to the castFailed pin. I guess it can’t cast, so you will not get the output you expect? also add a breakpoint to your set node, there sould be the variable in scope when the debbuger halts.

What are you inputting as the object to the cast node?

get player character