MODULE: Screenshots SAVELOAD GUI v1.2 (now 2.72 compatible)

Started by SSH, Fri 09/09/2005 11:21:46

Previous topic - Next topic

SSH

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 (Requires AGS v2.71!)



The old zip file 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
12

simulacra

Thank you SSH! This was excellent!

You really made my day.

Pumaman


Shade

#3
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

Code: ags
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.

Scorpiorus

#4
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 :)

Sektor 13

#5
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.

SSH

The "offending" line the savegames module is:

Code: ags

    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
12

Pumaman

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?

SSH

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?
12

Sektor 13

#9
I look at the module, it says version 0.1
Maybe I should update.!

SSH

Well, upload the module that you used, first, so we can work out why AGS crashed!
12

Sektor 13

#11
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

SSH

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 ...
12

Sektor 13

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 !??

Pumaman

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?

Sektor 13

#15
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..

Pumaman

Can you try this with 2.71 RC 4 and see if it helps at all?

Sola

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.

Sinister

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?

SSH

12

SMF spam blocked by CleanTalk