Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

any help with "Accessed None" error

so, i have a "weapon_blueprint" that contains the "debug" Public variable

im giving the weapon to a "player_blueprint", the "weapon_blueprint" is saved in Public variable withing the "player_blueprint"

In the "player_animation_blueprint", im calling "debug" trough "player_blueprint"=>"weapon_blueprint"

The result is:

Blueprint Runtime Error: "Accessed None trying to read property GunEquiped". Blueprint: Player_anim Function: Execute Ubergraph Player Anim Graph: EventGraph Node: Print String

im calling "debug" trough "player_blueprint" and it's ok

help plz

Product Version: UE 4.20
more ▼

asked Oct 09 '18 at 03:44 PM in Using UE4

avatar image

3 2 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

It sounds to me like your player_animation_blueprint is attempting to call up your debug function before the weapon_blueprint variable is set on the player_blueprint actor.

In other words, the weapon_blueprint variable on your player blueprint is still null (not yet set) when player_animation_blueprint is trying to access it.

This is a very common issue. You just need to ensure the weapon_blueprint variable is set before calling your debug function (or any other function that needs to access that variable).

When is your debug function being called right now? Is it on BeginPlay()? If so, try adding a Delay node to cause your debug function to wait, say, 0.5 seconds before executing. Or you could use a keyboard event to trigger your debug function. Either way, you want to allow your player_blueprint enough time to put a value (technically, a reference) into its weapon_blueprint variable.

One way to always handle this problem, if and when it arises, is to use the Is Valid? blueprint node (the one with the execution pin is especially handy). You can use this node to ask the variable, "Are you null or not?" before attempting to do something with it. If null, you can set the value right there and continue on. If not null, great, just carry on execution.

It's good to get into a habit of using nodes like Is Valid? to reduce the occurrence of issues like this. Eventually, you won't even think about it, and the simpler things will just work. (Of course, at that point, it's the more complex stuff that becomes a challenge. But that's part of what makes programming and game development so fun!)

Anyway, I hope this makes sense and helps you move forward. Good luck!

more ▼

answered Oct 09 '18 at 05:43 PM

avatar image

1.2k 4 5 8

avatar image ceno0 Oct 09 '18 at 05:45 PM

thanks, this will help

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question