Why am I getting an Error Accessed None log message?

So I get this error: “Error Accessed None ‘Current Pawn’ from node Set Current Pawn in blueprint TemplateRoom2”

And it guides me to this highlighted node. At this point Current Pawn’s value is None, but I want to set it to a new character every time. I DO NOT access NULL value in it, as you can see I use “IsValid” down the road just to check that.

2740-xxx.png

So why does it say “Accessed None” when I just want to set it?
Thanks for the help.

Well it turns out to be a little weird because of bad error log. It shows the wrong thing. Here is the example (I tried to replicate error once more)

Here’s the code that causing the error:


Current Pawn is not initialized.

Here’s where the error log leads us to:


These two things are not even connected, I broken the execution chain just for the test.

Is the current pawn “Man_3” from the persistent level valid? The error could be that the SET node is accessing a none pawn in Man_3?

Hmm weird… what if you attach a IsValid node to the Man_3 node? What does that give you?

I’m afraid I don’t have the old script with me :(, so it won’t be possible. I remember trying to put isValid all over the place, it always succeeded.

Oh, more so there is no Current Pawn variable attached to AI MoveTo in the current script.