Adventure Game Studio

AGS Support => Modules, Plugins & Tools => Topic started by: SSH on Fri 09/09/2005 11:21:46

Title: MODULE: Screenshots SAVELOAD GUI v1.2 (now 2.72 compatible)
Post by: SSH on Fri 09/09/2005 11:21:46
Finally and at last, I have taken my Savegames with screenshots tutorial and made it into a super-duper OO module.

as used in the AGS-Award-winning games Prodigal and Stargate Adventure

Download here (http://ssh.me.uk/modules/ScreenshotsSaveLoad.zip) (Requires AGS v2.71!)



The old zip file (http://ssh.me.uk/modules/ScreenshotsSaveLoad_old.zip) contains a game template which is basically the default game with the screenshots stuff added. The new zip file contains just the modules and GUIs necessary to add the GUI to an existing game:

There are actually two GUE/SCM (Individual GUI import file and Script module file) pairs. The first is YesNo, which is just a quick dialog to allow the question "Do you wish to overwrite this save game" to be asked with an OK and Cancel button. The YesNo module actually allows any Question to be asked here, by changing the GUI label.
The main one is the Saveload GUI and script module. The module must be listed after YesNo in the module list, as it uses it. Full instructions can be found in the README or in the top of the Saveload module's script header.

This module and GUI are released under the LGPL.

I got Darth to update the tutorial on his site to have a link to this thread, so that people pick up this instead of the old version there, which doesn't work with AGS 2.7.

Download site updated 29/03/06 due to Iqu's server dying
Title: Re: MODULE: Screenshots SAVELOAD GUI
Post by: simulacra on Sat 10/09/2005 02:46:24
Thank you SSH! This was excellent!

You really made my day.
Title: Re: MODULE: Screenshots SAVELOAD GUI
Post by: Pumaman on Sat 10/09/2005 13:18:57
Good work, SSH :)
Title: Re: MODULE: Screenshots SAVELOAD GUI
Post by: Shade on Thu 15/09/2005 17:25:40
I imported the modules in the right order and also imported the guis. When i want to test my game I get this error:

Quote
'In: savegames with screenshots"

error (line 80): local variable cannot have the same name as an import

static function sgs_i::reget_slots()
{
  int i=0;
  Label *li;         //line 80
  string temp;


How can i fix this?

Edit:

Thanks, I really had a variable called "li", but now it works perfectly.
Title: Re: MODULE: Screenshots SAVELOAD GUI
Post by: Scorpiorus on Thu 15/09/2005 19:21:57
Hmm, interesting. This sort of name collision could happen if you had your own module listed before "Savegames with screenshots" one and which exports a "li" variable. Change its name to something else.

Great work with the module :)
Title: Error in ags2.7 - savegame module
Post by: Sektor 13 on Mon 31/10/2005 09:33:15
Hi

As I released my new game, Stargate Adventure, some people reported back that they have problems with saving games (and loading too) - custom savegame module with pictures from SSH, and it gives them an error:

Quote
(ACI version 2.70.864)

Error: run_text_script1: error -6 running function 'goSaveLoadOK_Click':
Error: Error retrieving pointer: invalid handle 586
in Savegames with screenshots (line 89)
from Savegames with screenshots (line 105)
from Savegames with screenshots (line 116)
from Savegames with screenshots (line 243)
from Global script (line 3142)

It's not always the same error though. ???

--------------------------

And while reporting errors :) here is another one, but it is different:

Quote
An exception 0xC0000005 occured in ACWIN.EXE at EIP = 0x05C8849E ; program pointer is +1004, ACI version 2.70.864, gtags (1361,332)
(...)
in Room 1 script (line 13)

As I checked script line 13 says PlayVideo("Intro.avi"), so ist it something wrong with media player or something?
Only one user reported this one.
Title: Re: Error in ags2.7 - savegame module
Post by: SSH on Mon 31/10/2005 09:37:36
The "offending" line the savegames module is:


    sgs_dspr[i] = DynamicSprite.CreateFromSaveGame(i+sgi.offset, sgi.ss_width, sgi.ss_height);


which looks to me like it must be an AGS error
Title: Re: MODULE: Screenshots SAVELOAD GUI
Post by: Pumaman on Tue 01/11/2005 22:02:32
Has anyone else managed to produce an error like this?
("Error retrieving pointer: invalid handle XXX")

I'm trying to follow the stack trace but it doesn't make sense -- I presume you're using an older version of the module?

SSH, have you ever had this error while using or testing your module?

It must be some sort of AGS bug because a scripting error shouldn't be able to generate an error like this.

Finally, can you supply more details? Does the error happen when it's trying to display the save game window, or when it actually does a save/load? Or some other time completely?
Title: Re: MODULE: Screenshots SAVELOAD GUI
Post by: SSH on Wed 02/11/2005 09:44:16
Yes, the latest download has been upgraded to use the new Strings, and the dialog says 2.70 so he must be using an older one. I'm not sure if I have the old module, still. Maybe Rui has the old version on his resource site?
Title: Re: MODULE: Screenshots SAVELOAD GUI
Post by: Sektor 13 on Wed 02/11/2005 16:09:48
I look at the module, it says version 0.1
Maybe I should update.!
Title: Re: MODULE: Screenshots SAVELOAD GUI
Post by: SSH on Wed 02/11/2005 16:21:59
Well, upload the module that you used, first, so we can work out why AGS crashed!
Title: Re: MODULE: Screenshots SAVELOAD GUI
Post by: Sektor 13 on Wed 02/11/2005 20:51:19
Another error:

Quote
(ACI version 2.70.864)

Error: run_text_script1: error -6 running function 'goSaveLoadCancel_Click':
Error: Error retrieving pointer: invalid handle 583
in Savegames with screenshots (line 89)
from Global script (line 3149)

Here is your old module: http://www.golden-tomb.org/sector/oldsavegamescr.ZIP
Title: Re: MODULE: Screenshots SAVELOAD GUI
Post by: SSH on Fri 04/11/2005 15:28:04
As mentioned before, I think this issue is with AGS rather than the module, and thus you'll have to upgrade to get the fix anyway ...
Title: Re: MODULE: Screenshots SAVELOAD GUI
Post by: Sektor 13 on Sat 05/11/2005 13:41:57
Ok, thankx.  Well a lot of peoples did not experiance any error while saving/loading, neither did I, while testing the game, so could it be Windows 98 or XP (sp,sp2) related !??
Title: Re: MODULE: Screenshots SAVELOAD GUI
Post by: Pumaman on Sat 05/11/2005 20:43:26
I haven't managed to crash it yet either.

Is there any pattern to it? Did the problem happen when saving, or when loading, or both? Was it just after they started the game, or did it just happen randomly after they'd been playing for a while?
Title: Re: MODULE: Screenshots SAVELOAD GUI
Post by: Sektor 13 on Sat 12/11/2005 17:19:33
As far as i know, one had problems while saving and the loading, but next time worked fine. I dont know what they did in the save/load menu, could it be that the SAVE name was typed with unknown letters (like German "U"...) ? I know that if I use one of my slovenian letter whole text moves 1 line lower..
Title: Re: MODULE: Screenshots SAVELOAD GUI
Post by: Pumaman on Wed 23/11/2005 23:35:38
Can you try this with 2.71 RC 4 and see if it helps at all?
Title: Re: MODULE: Screenshots SAVELOAD GUI
Post by: Sola on Tue 13/12/2005 21:28:14
All I can say is that your Module made game development rewarding and fun.
May God bless you and increase your knowledge for the good of your fellow man.
Amen.
Title: Re: MODULE: Screenshots SAVELOAD GUI
Post by: Sinister on Tue 07/03/2006 02:55:45
Im having trouble establishing the maximum slot number for the savegames.
I've tried defining it by using:

#define SGS_MAX_SLOT

but i get that it's already defined, i cant seem to find it in the script. How do i go about changing the number of slots?
Title: Re: MODULE: Screenshots SAVELOAD GUI
Post by: SSH on Tue 07/03/2006 06:58:10
It's in the script header
Title: Re: MODULE: Screenshots SAVELOAD GUI
Post by: strazer on Thu 20/04/2006 02:09:55
Quote from: Pumaman on Wed 23/11/2005 23:35:38
Can you try this with 2.71 RC 4 and see if it helps at all?

So did this version actually fix the problem?
The changelog of AGS v2.71 RC 4 says
* Fixed Restore Game occasionally corrupting the managed object pool.
but I want to make sure it's related to this problem before I delete the bug reports.
Title: Re: MODULE: Screenshots SAVELOAD GUI v1.2 (now 2.72 compatible)
Post by: Cogliostro on Tue 19/02/2013 17:37:37
SSH -

Okay... trying to get this to work with AGS Ver 3.2.1 and it won't import any of the GUI files.  I did a search and this seemed to be the most current "Save Game Module"  I *assume* I could manually create the GUI's but a little help would be greatly appreciated.

- Cogliostro
Title: Re: MODULE: Screenshots SAVELOAD GUI v1.2 (now 2.72 compatible)
Post by: .M.M. on Wed 20/02/2013 12:17:25
Try downloading an older version of AGS, then import the GUI files, run the project with the new AGS and export GUI files. It's a bit complicated, but it should work.  ;)