Unresolved import, game crash.

Started by KodiakBehr, Wed 12/09/2012 00:28:10

Previous topic - Next topic

KodiakBehr

Upon changing rooms, I get a crash and the following error message that I've never seen before.

Error: Unable to create local script: Runtime error: unresolved import 'Character::Changeroom^3'

The code for changing rooms reads:

Code: ags

function hembassytravel_WalkOn()
{
if (player.ID!=0){player.ChangeRoom(15, 463, 31);}
else {
  if (player.y>250){
        player.ChangeRoom(15, 614, 190);
    }
  else if (player.y<251){
        player.ChangeRoom(15, 70, 190);  
    }
}

}


Any ideas where I should be looking for problems?  Using AGS Draconian.

Calin Leafshade

yes, Alan's version has no 3 parametered change room. You need to pass a 4th parameter for the character direction.

Dunno why it flags up the error in that way. I assume Alan has done something weird when overriding the function.

KodiakBehr

Oh, I had no idea!

How does the fourth parameter work?  Is there documentation somewhere I should be reading before using this thing?

Also, I get a similar error (the ^4 becomes a ^3) in the standard version of the AGS engine, so could it not be something else entirely?

Alan v.Drake

No, you just need to rebuild all files.
Anyway, I had found a way to avoid that, but it's all brewing in the repository limbo for now.

The fourth parameter would be "direction" (which corresponds to the loop number)

- Alan

SMF spam blocked by CleanTalk