Porting from 2.62 to 2.71

Started by Shini, Sat 15/04/2006 10:11:48

Previous topic - Next topic

Shini

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

Ishmael

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?
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Ashen

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.
I know what you're thinking ... Don't think that.

Gilbert

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.

SMF spam blocked by CleanTalk