Can save map datatype in main menu, but not in game

(edit: my first comment is changing situation)

Hello,

Main question: is it possible that I cannot save Map data variable in some circumstances? Internet says maybe yes and I have a problem with that…

Long text:

  1. I can successfully save data to a map variable in the main menu.
  2. But when I try to save them during game play (lvl finished, delete data in map), I would assume I do it correctly.
  3. I load back the menu and the data I deleted are back in Save Game… So I guess I do not actually save the change, somehow…

The code I assume is ok:

(I removed Debug Print strings from the picture)

Can it be because the game is set to be paused?
Or is there some no-begginer-thing that blocks me from.

Thank you Everynony and others answering my questions :slight_smile: Thank you even if you answer this one.

1 Like

The problem is not with the save game,
When I Delete element from map, then call that map before and after save game, it is always back there. Before and after. So I work with the map in a wrong manner, just to find that out.

So basically I think I delete the element out of Map, but I do not. Then I save it back with the not-deleted value…

You’re removing the key from the list of keys, but you haven’t actually removed the entry from the map in the save game :slight_smile:

image

1 Like

Thank you again.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.