SOLVED - save/load doesnt work

Started by shaun9991, Wed 31/07/2013 18:15:46

Previous topic - Next topic

shaun9991

Hi guys, wondering if someone can help. I've just compiled my game to test it, and found that when I click save or load, nothing happens at all. Meaning I can't save or load the game. On previous compiles this function has worked without a problem . Anyone know why this is suddenly not working? Any help appreciated

Thank you
Support Cloak and Dagger Games on Patreon: https://www.patreon.com/user?u=460039

Khris

Could you elaborate a bit? Are you using a single saveslot and does the game immediately load/save once you click the button? Are you positive the button's / hotspot's function is called? If you put Display("Saving now"); right before the SaveGameSlot() call, does that show up?
Also, show us your code, and try to think of anything else you might have changed since it has been working. Are you testing this from a flash drive or something like that? Have you added any modules?
If the save/load buttons are on a GUI, could you have set it to being not clickable?

In short: MORE INFO, SHOW US YOUR CODE.

shaun9991

#2
.
Support Cloak and Dagger Games on Patreon: https://www.patreon.com/user?u=460039

shaun9991

hi.
not using a single save slot. when i click save or load the whole panel gui just disappears. ive had a look at the code and compared it to the default code and noticed this..

function btnSave_OnClick(GUIControl *control, MouseButton button)
{
  gPanel.Visible = false;
  mouse.UseDefaultGraphic();
  gIconbar.Visible = true;
  Wait(1);
  //btnIconSave_Click(btnIconSave, eMouseLeft);
}

somehow my code had cancelled out the btniconsave at the end with //

so i removed the //

but now if i try and run the game it says error - undefined symbol 'btnIconSave'

however, it does seem to be defined...
function btnIconSave_Click(GUIControl *control, MouseButton button)
{
  show_save_game_dialog();
}

im really confused. the code all seems to be fine but it just wont work. i havent used any mods

any help super appreciated, thanks
Support Cloak and Dagger Games on Patreon: https://www.patreon.com/user?u=460039

shaun9991

ISSUE SOLVED - SORRY GUYS

removed the btnIconSave bit from Saveonclick and replaced with show_save_game_dialog(); directly

it now works. im sure its terrible coding but it seems to be ok for now...

thanks
Support Cloak and Dagger Games on Patreon: https://www.patreon.com/user?u=460039

SMF spam blocked by CleanTalk