When i test my game locally, everything saves fine. But when i upload the game to kongregate, the game doesn’t save, is there something else i should be doing? And can someone test this themselves? (F & F) The game auto-saves.
This is how im saving.
var saveFile:SharedObject;
function checkSaveFile():void { // First function called in the game
saveFile = SharedObject.getLocal("FFsave");
if(saveFile != null) {
curLevel = saveFile.data.curLevel;
if(saveFile.data.curAttempts>1) curAttempts = saveFile.data.curAttempts-1;
if(curLevel > 3) { //saveFile has completed tutorial levels
option1Enabled = true;
showTutorial = false;
}
} else saveGame();
}
function saveGame():void { //saves curren level and attempts to saveFile
saveFile.data.curLevel = curLevel;
saveFile.data.curAttempts = curAttempts;
saveFile.flush();
}
And the saveGame() function is being called regularily throughout the game whenever the player completes a level/dies or beats the game.
Thanks to anyone who helps!