"Acessed none trying to read property..."

Greetings. I’m kinda noob, so sorry if this sounds like a dumb thing. I’ve created a float value in MyCharacter BP that would trigger other blueprints after it reaches certain values, but I keep getting the error mentioned in the title for every node that tries to read MyCharacter or any BP at all, despite the fact I’ve set the variables public.

This is the simplest sample where I’m gettings this error. What am I doing wrong?


You need to cast that reference to class of blueprint you want to pull variables from.
Or that reference pointer is not pointing to actor.

Whoa, that was fast, thanks for the reply, but I still have some doubts.
Which classes should I choose to point to a Blueprint (in the case, a lamp BP) or the player? And should I make some changes in the nodes?

Thanks for the reply, but can you describe what I have to change step by step? I don’t really know what classes of actors I’m looking for in each case and neither about the node I’d need to change.

It seems that the variable “vocé” is currently null. Are you setting it somewhere? There are many ways to do that, the simplest would be to check the “expose on spawn” checkbox, and when you create the widget, get the “vocé” reference you already have, which I assume you do, and pass it in there.
If the widget is created in the “vocé” actor, get a “self” node and pass it in in the “vocé” variable of the widget.

Here’s another BP with the same problem. The “você” BP is the character BP, wich overlaps the collision box and trigger the event.I manage to find the float value in the Node (wich is the current value of “Temor Atual” or “Fear Level”), but it doesn’t get the value at all when the work needs to be done, I’ve tried a IsValid node to see if it ha some delay on the processing, but it basically makes the whole Event BP stop working. At this point I noted that I haven’t put a “Você” in the map, but even if I do, doesn’t change anything. Also other blueprints that communicate between other blueprints already on the map aren’t getting where they should as well.

All I am seeing is a variable which is a reference to a specific class, where/how do you add anything to it? (talking about Vocé). If it’s not pointing at anything your error makes perfect sense so I think that’s what’s going on.

I named the blue variable and the character the same.
Anyway, if you’re right, what exactly should I do to link to my character BP?

You need to set the character reference with the character you wish it to point to.
If I say the word “Ball”, you’re probably thinking of a round bouncy thing, because those are (often) their properties.
If I say the word “Ball” in a room filled with balls, you’re going to ask me “well, which one?”.
If I say the word “Ball” and point at a ball, then you know which one I am referencing.

Your variable gives you access to all the properties that class has, but without a valid reference it’s not very useful.
There are many ways to set a reference and how you go about it depends. For example the widget, if you create it inside the character blueprint, then all you need to do is to expose the variable inside the widget and pass in a “self” node when you create the widget.
If you are creating it anywhere else, perhaps the player controller, then a more elaborate method is needed. Maybe (get controlled pawn) - (cast to [character]).

In the case of the overlap trigger, you need to take the actor pin and cast it to “vocé”.

Alright, will try it later and post results. Thank you very much!

Have a picture with some examples of how to set a reference.


Accessed none trying to read property

This happens when the BP is run, and there is no variable data yet. This could happen for instance when the order of processed BPs is off, or the related variable becomes effective at a later stage.

Normally a “IsValid?” node tied to the variable prevents this error.

It worked! I thought the variable chosen would be THE character itself, not it’s class. Anyway, I followed ste1nar’s tips and now it’s working great! Hopefully, I’ll be posting my demo on the forums soon enough. Thank you very much, I really appreciate the help!

For those who want to see the solution, here’s a screen: I followed the third workaround since this BP is no the character and for multiplayer purposes.


Best wishes and a happy new year.