Announcement

Collapse
No announcement yet.

Accessed None trying to read property

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Accessed None trying to read property

    I'm getting the dreaded [MENTION=59935]A[/MENTION]ccessed None Trying to read Property@ error and I can't figure out why.

    I've tried searching for something similar to this specific issue I'm having. Some are close, but almost no cigar and I can't seem to figure out why.

    I have a blueprint setup in the Gameplay Widget that calls on a variable (Equipped Weapon) in the Player Character.

    Click image for larger version

Name:	GameplayWidget Graph.PNG
Views:	1
Size:	123.7 KB
ID:	1204798

    I've previously set the variable in the Player Character Blueprint on Event BeginPlay

    Click image for larger version

Name:	Set Equipped Weapon.PNG
Views:	1
Size:	104.6 KB
ID:	1204799

    The above seems to work as when I'm debugging the equipped weapon,

    Click image for larger version

Name:	printString.PNG
Views:	1
Size:	32.8 KB
ID:	1204800,

    I get the correct Equipped Weapon, Assault_Rifle_BP_C_O

    But I'm still getting the error in the Gameplay Widget BP as the variable property is none.

    What am I doing wrong?

    Cheers












    Engine Version: 4.12.4

    #2
    Maybe it is load order. Some blueprints are loaded before other, if you try to read property from blueprint that is not yet loaded you get few of such errors.
    Also get player character (0) may be reason if you play as player 1 and player 0 is not loaded.
    Another thing i would change is making event (dispatcher) in player character (or controller) that updates variables for widgets. Then trigger it to update variables. Also pass all variables trough that event, and even do struct that holds them all, this way code looks better.

    Comment

    Working...
    X