Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: eurobusker on Tue 03/11/2009 16:23:21

Title: AGS 2.71 old project
Post by: eurobusker on Tue 03/11/2009 16:23:21
I did a game 3/4 years ago using 2.71 and am unable to update the game to 2.72 to eventually use the latest ags 3.1 editor.
there was an error compiling your script. The problem was: in: 'other room'
error in line 48, undefined symbol 'GetGameParameter'
Is there a thing I can do? or must I finish my game using 2.71.
It works and compiles perfectly in 2.71
Title: Re: AGS 2.71 old project
Post by: NsMn on Tue 03/11/2009 16:26:57
GetGameParameter? I'm not sure, but you'll have to use Game. instead. Or didi you try turning "Enforce object-based scripting" off?
Title: Re: AGS 2.71 old project
Post by: eurobusker on Tue 03/11/2009 16:30:40
I just tried switching Enforce object-based scripting off, it works in 2.72!
thanks will now save it and try to use 3.1
Thanks  :)
Title: Re: AGS 2.71 old project
Post by: eurobusker on Tue 03/11/2009 16:40:47
ok, it works fine on 1.72
but going to 3.1 gives me this! lol

Failed to save room room5.crm; details below
room5.asc(142): Error (line 142): Undefined token 'unhandled_event'
Title: Re: AGS 2.71 old project
Post by: NsMn on Tue 03/11/2009 16:46:40
Where did you use the function? If it's in a room script, you'll have to import the function unhandled_event in the global header (import function unhandled_event)
Title: Re: AGS 2.71 old project
Post by: eurobusker on Wed 04/11/2009 13:51:29
done that, thanks, my errors are now only one,

room5.asc(142): Error (line 142): PE04: parse error at 'unhandled_event'

function hTelephone_UseInv()
{
if (player.ActiveInventory == inventory[3]) {
dialog[0].Start();
}
else {
unhandled_event(1, 3);
}
}

any ideas?
Title: Re: AGS 2.71 old project
Post by: Pumaman on Wed 04/11/2009 21:52:14
What did you add to the global header?

To clarify, what you should have done was open GlobalScript.ash and add:

import function unhandled_event(int,int);

doing that should solve your error.