Hi have an inventory widget shows up on the screen with a button but as soon as i hit esc i I get the classic error Blueprint run time error " accessed none trying to read property inventory_wb node: update inventory "
So the player blueprint is trying to access the update inventory function i made within the inventory widget.
I wondering if I add into the update inventory function the is valid node , will resolve this ? or do i need to set a variable somewhere within the update inventory function or make a variable public?
Thanks
Accessed none sounds like it couldn’t find the widget. Are you promoting the widget to a variable on the player after creating it and adding to screen?
Hi thanks for your reply. I will check that I have set that variable for the widget. Also I havent got the widget running directly from event begin play as i am just using a key binding.
Whether it’s created in begin play or a key event, you should be able to right click the blue return value pin of create widget node and promote to variable. If calling the widget from some other key, will probably want to validate the var.
hi thanks a lot for your reply’s and i have just uploaded screenshots of how i have it currently set up. If you can please have a look at them when you can and just circle on the shots what stands out and looks wrong. appreciate it
The first thing that jumps out at me is: why are there 2 input actions for the inventory? If they’re both bound to the same key in the mapping context, the one calling the function on the widget won’t work if it’s running first in the input stack. Condensing the input actions into one event/key might help clear up the problem.
Hi okay thanks a lot for your reply. I have been doing a lot of testing between the level blueprint and player controller blueprint so that would explain why there is more than one input action.