I can not for the life of me figure out why my scene variable (which contains inventory data) is not saving to storage. i’m trying to make the inventory of my player save and persist through game restart, and be loaded automatically on game start.
*What is the expected result
when i press the save and quit button, the saveInventory variable should have its configuration changed so that it is included in “mainSave” profile. then the inventory “inventory” should be saved to that variable, then a save state should be made with the key “mainSave” under the “mainSave” profile, which should include that variable. Then after 3 seconds the game quits, as it’s supposed to.
then, at the beginning of the scene, after some initialization stuff unrelated to my issue, the save should be loaded, including that variable, and then the inventory should be loaded from that variable.
What is the actual result
Saving supposedly works, then the game quits. upon game boot-up, the inventory never loads.
Related screenshots
save code:
load code:
Project files (optional)
Insert a minimal game showing your issue in a .zip or .rar.

