Saving Boolean issue

I just had the same problem with saving boolean values. I had a save game that stored a map data structure. Keys are enums and values are structs that contain a data table row handle and a boolean that indicates whether the “equipment” is equipped or not.

Right up until the moment of saving the boolean is the correct value but when I load/reload the save game the boolean would reset and be the wrong value. Everything else is loading correctly - the row name in the row handle (which is what I change to create a customization menu functionality), other variables in the save game etc.

I ended up using an enum for the equipped state, i.e. an enum with two keys of “Equipped” and “Unequipped”. This solved the issue and now everything loads correctly.

I really think this is a bug because I can’t figure out why it just didn’t work with booleans.

1 Like