I'm not sure, but it appears the error comes on line RestoreGameSlot.
Whether the savegameindex array is defined as:
Code: ags
And therefore it crashes on 21, or it's some old array i don't recall. So either replace the RestoreGameSlot with what i have below or increase the array size.
Code: ags
Code: ags
Whether the savegameindex array is defined as:
int savegameindex[21];
And therefore it crashes on 21, or it's some old array i don't recall. So either replace the RestoreGameSlot with what i have below or increase the array size.
int savegameindex[50];
function restoregame_Click(GUIControl *control, MouseButton button)
{
aSound11.Play();
if(partidas.ItemCount!=0)
{
int index = partidas.SelectedIndex;
RestoreGameSlot(partidas.SaveGameSlots[[index]);
partidas.FillSaveGameList();
savegame.Enabled=true;
guardar.Enabled=true;
cerrar.Enabled=true;
SetGameOption(OPT_WHENGUIDISABLED, 2);
}
else
{
gSavemsg.Visible=true;
savemsglbl.TextColor = 65296;
savemsglbl.Text = ("There is no game to load");
Wait(80);
gSavemsg.Visible=false;
}
}