Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Akumayo on Sat 04/11/2006 22:06:32

Title: Unresolved Import Error - Too many parameters?
Post by: Akumayo on Sat 04/11/2006 22:06:32
Normally I can resolve these myself, but this one is making me angry...

QuoteScript Link Failed:  Runtime error:  unresolved import 'SKMG::PlayGame^10'

And here's the coding I think is relevant:


static int SKMG::PlayGame(int xbar_left, int xbar_right, int ybar_up, int ybar_down, int NumberOfRows, int Speed, int Varience, int Max, int StopAt, Directions SlideDirection) {
...
}



struct SKMG {
  import static int PlayGame(int xbar_left, int xbar_right, int ybar_up, int ybar_down, int NumberOfRows, int Speed, int Varience, int Max, int StopAt, Directions SlideDirection);
...
};


Any ideas?

-Regards, Comrade Akumayo
Title: Re: Unresolved Import
Post by: monkey0506 on Sat 04/11/2006 22:25:57
It's actually a problem that's been encountered before (http://americangirlscouts.org/bbc.com/yabb/index.php?topic=21621.msg264056#msg264056)* (also here (http://americangirlscouts.org/bbc.com/yabb/index.php?topic=27727.msg352508#msg352508))...and Chris seems to have been baffled by it (http://americangirlscouts.org/bbc.com/yabb/index.php?topic=27727.msg352543#msg352543).

Hehehe...well...perhaps not "baffled," but there seems to have been no follow up on the issue.


*I was using 15 of the maximum 15 parameters and AGS was crashing..
Title: Re: Unresolved Import
Post by: Akumayo on Sat 04/11/2006 22:28:16
Damn, one over the superficial limit...  I guess I'll have to find a workaround too...
Title: Re: Unresolved Import
Post by: monkey0506 on Sun 05/11/2006 03:47:30
Well Chris said that we should be able to have 15 parameters...theoretically. It...just doesn't seem to actually work out there in the field.
Title: Re: Unresolved Import
Post by: SSH on Mon 06/11/2006 16:56:43
Personally, I think it is better to have those paramters as properties of your object rather than have  huge argument lists, anyway. It makes the code waaay more readable to have:


SKMG.xbar_left=10;
SKMG.xbar_right=100;
SKMG.ybar_up=20;
SKMG.ybar_down=200;
SKMG.NumberOfRows=4;
SKMG.Speed=5;
SKMG.Varience=13;
SKMG.Max=98;
SKMG.StopAt=97;
SKMG.SlideDirection=up
SKMG.PlayGame();


than..


SKMG.PlayGame(10, 100, 20, 200, 4, 5, 13, 98, 97, up);

Title: Re: Unresolved Import
Post by: monkey0506 on Mon 06/11/2006 17:59:00
More readable, but not always practical.
Title: Re: Unresolved Import
Post by: SSH on Mon 06/11/2006 21:06:13
More practical than "Script Link Failed:  Runtime error:  unresolved import 'SKMG::PlayGame^10'" ;) :P
Title: Re: Unresolved Import
Post by: monkey0506 on Mon 06/11/2006 21:48:04
Bugs in AGS aren't practical? CJ works really hard to bring us this great program and all you can do is complain! >:(



:=