Okay. That's not how you do it. Remove those two lines from the top of the script.
First of all, if you write "function" in the beginning of a line, it means you are declaring a function, which is not what you want to do. I suggest you read about functions and how they work in the manual and also try and learn the basics of how scripting works.
You also don't need to open the module or modify it in any way. What you do need to do is replace every SaveGameDialog-function you may have in your global script with "SaveLoad.OpenSaveGUI();". The same thing with RestoreGameDialog, except of course then you will have to write "SaveLoad.OpenRestoreGUI();".
So for example if your on_key_press looks like this:
[code]
function on_key_press(int keycode) {
// called when a key is pressed. keycode holds the key's ASCII code
if (keycode==363) SaveGameDialog(); // F5
if (keycode==365) RestoreGameDialog(); // F7
}
[/code]
You will want to modify it like this:
[code]
function on_key_press(int keycode) {
// called when a key is pressed. keycode holds the key's ASCII code
if (keycode==363) SaveLoad.OpenSaveGUI(); // F5
if (keycode==365) SaveLoad.OpenRestoreGUI(); // F7
}
[/code]
This will run the functions declared in the Simple Save&Load -module, instead of running the default functions of AGS.
I hope this is clear enough. If you have any further questions, don't hesitate to ask.
