Accessed None trying to read property inventory

I’m trying to add an item object to the array of item objects which is inside my inventory object, but it always give me this error im abit confused on what should be done right now… sorry for taking a long from your time guys but this would help me so much in future.

~ Thanks

Inventory variable is None, meaning it’s not set. AddToInventory might be called before Inventory variable is initiated. Easy fix is to use IsValid node to check in Inventory is set and stop the code if not

Thanks a lot for your time and help, can i ask another question? im sry but how can i set an empty object of inventory? like cant i have a default constructor or something im kinda lost about this because it doesnt want to set it with default values, how can i make the instance of inventory that is inside thirdpersoncharacter to be able to add in its array?

~Super thanks to u again!

You need to create it first, don’t know how your inventory works, if its Actor just spawn it as any other actor, if it’s non-actor object use “Construct Object From Class” node, if it component use “Add Component” (there individual node for each component class) or manually place it in component list in blueprint