Hello,
I´ve tried to use the GUIs and the Scripts from the Screenshot-Template(http://www.adventuregamestudio.co.uk/yabb/index.php?topic=38928.0) afterwards for my game.
But now the player can´t save his game no longer. No screenshots, no saves.
And when I try to load an empty slot an error occured:
"ListBox.SaveGameSlot: index out of rage"(This error occures in the original template too)
I´ve got the same scripts, for Pressing the OK-Button on Save- and Load-GUI but I post it again as a precaution:
Code: ags
Code: ags
I have the excact same GUIs(exported from template and imported in my game) and I think I have the same Scripts too. Is there maybe something I could have forgotten?
If somebody has an idea...
I´ve tried to use the GUIs and the Scripts from the Screenshot-Template(http://www.adventuregamestudio.co.uk/yabb/index.php?topic=38928.0) afterwards for my game.
But now the player can´t save his game no longer. No screenshots, no saves.
And when I try to load an empty slot an error occured:
"ListBox.SaveGameSlot: index out of rage"(This error occures in the original template too)
I´ve got the same scripts, for Pressing the OK-Button on Save- and Load-GUI but I post it again as a precaution:
function btnSaveOK_OnClick(GUIControl *control, MouseButton button) {
if (lstSaveGames.SelectedIndex >= 0) { // If you've selected a savegame slot
saveslot = lstSaveGames.SelectedIndex; // Get the selected savegame
text = txtSaveName.Text; // Get the typed text
if (screenshot != null) {
screenshot.Delete();
btnSaveScreen.NormalGraphic = SL_EMPTY_SPRITE; // Resets the screenshot
}
gSave.Visible = false;
mouse.Mode = eModeWalkto;
Wait(1);
SaveGameSlot(lstSaveGames.SaveGameSlots[saveslot],text); // Overwrites the selected game
}
else { // Save the game in a new slot
if (totalsaves < 10) { // If the savegame limit is not reached (50)
text = txtSaveName.Text; // Get the typed text
if (text == "") {
Display("Please enter a name for your savegame."); // If player didn't enter a name, tell them
}
else { // Proceed as usual
if (screenshot != null) {
screenshot.Delete();
btnSaveScreen.NormalGraphic = SL_EMPTY_SPRITE; // Resets the screenshot
}
mouse.Mode = eModeWalkto;
Wait(1);
SaveGameSlot(totalsaves+1,text); // Saves game (text as description)
}
}
else Display("All save slots are full. Please overwrite a previous save.");
}
}
function btnLoadOK_OnClick(GUIControl *control, MouseButton button)
{
saveslot = lstLoadGames.SelectedIndex; // Gets the selected slot
gRestoreGame.Visible = false;
mouse.Mode = eModeWalkto;
if (screenshot != null) {
screenshot.Delete();
btnLoadScreen.NormalGraphic = SL_EMPTY_SPRITE; // Resets the screenshot
}
RestoreGameSlot(lstLoadGames.SaveGameSlots[saveslot]); // Restores the selected slot
}
I have the excact same GUIs(exported from template and imported in my game) and I think I have the same Scripts too. Is there maybe something I could have forgotten?
If somebody has an idea...