I am trying to set up a save function in my HaxeFlixel game.
Some background: the subject in question is an instance Playerthat expands FlxSprite. Saving data is stored in an instance of a custom class that I made for it. This instance is stored in StringMap(keys are save names), which is saved by serializing it into a variable in FlxSave.
Creating and saving saved data works great. However, reading the save data back causes the game to crash with the message "Invalid field: pixels." pixelsis a field from FlxSprite, but this is not the first such field in a serialized string, so this is probably not the case.
If useful, declaring this field y6:pixelsnis:
y run the field called ...6: string length 6 ...pixels (line)n null
source
share