Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Shini on Sat 15/04/2006 10:11:48

Title: Porting from 2.62 to 2.71
Post by: Shini on Sat 15/04/2006 10:11:48
Hi,

I've some problem when trying to port my game to AGS 2.71...

Most the functions I want to import in my script header return me an error!
example:

in my global script, i define these 2 functions:
void init_match()
{
(code here)
}

void update_scores()
{
(code here)
}

and when I want to import these 2 functions in the script header, the first one works, but not the second! (can't remember the exact error message, will post it soon)...

What's the... ?
Title: Re: Porting from 2.62 to 2.71
Post by: Ishmael on Sun 16/04/2006 14:12:04
void? That's C, IIRC. AGS doesn't use it, AFAIK.

Just:
function name() {
// code
}

But if that doesn't cause errors, I guess it won't hurt to leave them as they are. But what's the import line you use?
Title: Re: Porting from 2.62 to 2.71
Post by: Ashen on Sun 16/04/2006 14:30:51
Newer versions of AGS can certainly use void - not sure about 2.62 but since Shini's porting from it that's not really a problem. Try them as function (AFAIK it doesn't make a difference to how they work), but beyond that we'll really need to see what the error message actually was.
Title: Re: Porting from 2.62 to 2.71
Post by: Gilbert on Sun 16/04/2006 15:19:20
How're the original function declaration lines and the import function lines looked like?

You gave us too little information, so we can't help much, chances are, there're some mistakes in your original codes (like number or types of parameters not matching), as newer versions of AGS often had better syntax checking introduced into the editor so to iron out more mistakes.