FlxSave on Linux

  • Hi!
    I have a bit of a problem with saving in my game. While on my machine everything's fine and dandy, when I send the game to my friends, saving doesn't work at all.
    Here's the bit of code responsible for remembering the state of the game:

    public function saveGame(){
    	EntityScripts.newGame = false;
    	save.data.storyVars = EntityScripts.storyVars.copy();
    	save.data.collectedBoxes = EntityScripts.collectedBoxes.copy();
    	save.data.locationName = location.locationName;
    	trace("Save the game plxthxbye...");
    	save.flush(0, onSaveFlushComplete);
    	save.close(0, onSaveCloseComplete);

    This binding, flushing and closing every time the functoin is called is just me trying to figure out what's going on.
    So, the onSaveFlushComplete and onSaveCloseComplete are called successfully, with "true" as an argument. Debug version of the game doesn't spit any warnings. Everything seems to be fine. Yet, the save.data is completely empty, when I'm trying to get anything. Like this for example:

    public function isGameSaved(){
    	return save.data.vars != null;     

    I'm testing the game on my Linux machine, and it's working. My friends are testing it on they two linux machines and it doesn't work at all. Any ideas? :D
    Also, where is the save file stored on linux? Tried to figure this out, but after looking at the flixel code and searching my hard drive I'm completely clueless. :D

  • Try serialization as it's recommended here

  • @DleanJeans said in FlxSave on Linux:

    Try serialization as it's recommended here

    It helped! Thank you! :)

Log in to reply

Looks like your connection to HaxeFlixel was lost, please wait while we try to reconnect.