slight alteration to persistence

BlitzMax Forums/Brucey's Modules/slight alteration to persistence

slenkar(Posted 2009) [#1]
When I remove a field from a type and try to load in a saved game the program crashes because persistence is trying to write to a field that doesnt exist.
I simply put one line in the deserialize method that checks for the existence of the field I think it was : if fieldobj<>null

and it works great now, I can load old saved games in and it always works, never crashes.


Brucey(Posted 2009) [#2]
Ah. I never considered that... the removal of a field. Good point!


slenkar(Posted 2009) [#3]
thanks