Inventory system problem

Guys i’m using the inventory system example and most of it works fine in my project, problem is when I change scenes, it doenst work anymore. I checked the saved local storage and it’s creating weird values.

I have the save_inventory, load_inventory and the inventory events as suggested in the example.

I’m basically writting 3 variables in the inventory_save file: item_name, item_description and numberofitems.

This is how the file looks like the first time I add items to the inventory and save (all good):

But if I change the scene, the inventory slots are empty (the values in the storage are still the same at this point), that probably means it’s saving properly but it’s not loading properly.

When i tried to add inventory items again, it doenst add them and all the saved values in the storage change to random values and if I change scenes the values keep changing or incrementing like this (see comments pleas):

each image is the result of changing scenes.

Can anyone give me some clues on why is this happening? many thanks!

this is my save_inventory events:

and this is my load_inventory events:

It’s almost the same as the inventory system example.

I just found this thread and I think it’s a better approach for the inventory. I’ll try it out.
Thanks!

Hi. If I duplicate the Scene in the example it works for me. All I have to do is call the “load_inventory” external event “At the beginning of the scene” on the second scene and its load the inventory just fine for me.

It could be the way you setup the inventory if you do it manually.