Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - ZakMcKracken

#1
Hello,

I'm creating a new Save/Load GUI with screenshots.
Since I haven't created one before, I looked for a good tutorial, and found this one:
http://www.twin-design.com/agsezine/9/tutorial.cfm
(this is Scripting Tutorial By Andrew McCormack)

It says the tutorial will present how to make a load/save game dialog that uses the new "save games with screenshots" feature of AGS v2.6 onward.

Well... I'm using AGS 2.7, I did the tutorial step-by-step, but when I save the game, the compiler stops with message "undefined symbol LoadSaveSlotScreenshot'":
Code: ags

function sgs_getslots()
{
int i=1;
while(i<=6) 
	{
	if (GetSaveSlotDescription(i, sgs_struct[i].t)) 
		{
		sgs_struct[i].spr=LoadSaveSlotScreenshot(i, SGS_WIDTH, SGS_HEIGHT);
		} 
	else
		{
		StrCopy(sgs_struct[i].t, "");
		sgs_struct[i].spr=SGS_EMPTY_SPRITE;
		}
	SetLabelText(SAVELOAD, 6+i, sgs_struct[i].t); 
	SetLabelColor(SAVELOAD, 6+i, SGS_LABEL_COLOUR); 
	SetButtonPic(SAVELOAD, i, 1, sgs_struct[i].spr);
	i=i+1;
	}
Wait(1); 
SaveGameSlot(100, "temp"); 
sgs_struct[0].spr=LoadSaveSlotScreenshot(100, SGS_WIDTH, SGS_HEIGHT); 
DeleteSaveSlot(100); 
}


Well, the help file says that LoadSaveSlotScreenshot is obsolete, and suggests to use DynamicSprite.CreateFromSaveGame

I tried, but with no success. I changed the int to DynamicSprite*, but it doesn't compile.

Can someone clarify the concepts?
I think the tutorial is very very good, maybe it could be more useful fix the tutorial to make it compatible with AGS 2.7

Thank you.
SMF spam blocked by CleanTalk