I recently put my game as complete but some bugs have come up
here a copy of my script
//INTERFACE 4 - SAVE GAME
if (interface==4) {// if save interface
if (button==0) { //'Save' button // if save is pressed
index=ListBoxGetNumItems(4,2);// Count saved games
if (index<20) { // if less than 20
GetTextBoxText(4,3,text); // Get the typed text
InterfaceOff(4); // Close interface
SaveGameSlot(index+1,text); } // Save game (text as description)
else { // if saved games are 20
index=ListBoxGetSelected(4,2);// Get the selected save game
GetTextBoxText(4,2,text);// Get the typed text
InterfaceOff(4);// Close the interface
SaveGameSlot(savegameindex[index],text); }// Overwrite the selected game
}
if (button==1) InterfaceOff(4);// if cancel is pressed close interface
}
//INTERFACE 5 - RESTORE GAME
ListBoxSaveGameList(5,3);// Fill List box with saved games
if (interface==5) {// if Restore interface
if (button==1) { // if cancel is pressed
InterfaceOff(5); }// Close interface
if (button==0) { //'load' button//if load is pressed
index=ListBoxGetSelected(5,3);// get the selected game
RestoreGameSlot(savegameindex[index]);}// restore the game
}
}
Thanks
Quote from: miryoku_81
- the game crashes to the desktop when I start a new game unless I play it in a window
- unable to save over existing save games
here a copy of my script
//INTERFACE 4 - SAVE GAME
if (interface==4) {// if save interface
if (button==0) { //'Save' button // if save is pressed
index=ListBoxGetNumItems(4,2);// Count saved games
if (index<20) { // if less than 20
GetTextBoxText(4,3,text); // Get the typed text
InterfaceOff(4); // Close interface
SaveGameSlot(index+1,text); } // Save game (text as description)
else { // if saved games are 20
index=ListBoxGetSelected(4,2);// Get the selected save game
GetTextBoxText(4,2,text);// Get the typed text
InterfaceOff(4);// Close the interface
SaveGameSlot(savegameindex[index],text); }// Overwrite the selected game
}
if (button==1) InterfaceOff(4);// if cancel is pressed close interface
}
//INTERFACE 5 - RESTORE GAME
ListBoxSaveGameList(5,3);// Fill List box with saved games
if (interface==5) {// if Restore interface
if (button==1) { // if cancel is pressed
InterfaceOff(5); }// Close interface
if (button==0) { //'load' button//if load is pressed
index=ListBoxGetSelected(5,3);// get the selected game
RestoreGameSlot(savegameindex[index]);}// restore the game
}
}
Thanks