Unresolved Import Error - Too many parameters?

Started by Akumayo, Sat 04/11/2006 22:06:32

Previous topic - Next topic

Akumayo

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:

Code: ags

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) {
...
}


Code: ags

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
"Power is not a means - it is an end."

monkey0506

It's actually a problem that's been encountered before* (also here)...and Chris seems to have been baffled by it.

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

Akumayo

Damn, one over the superficial limit...  I guess I'll have to find a workaround too...
"Power is not a means - it is an end."

monkey0506

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.

SSH

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:

Code: ags

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

Code: ags

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

12

monkey0506

More readable, but not always practical.

SSH

More practical than "Script Link Failed:  Runtime error:  unresolved import 'SKMG::PlayGame^10'" ;) :P
12

monkey0506

Bugs in AGS aren't practical? CJ works really hard to bring us this great program and all you can do is complain! >:(



:=

SMF spam blocked by CleanTalk