[SOLVED] script link failed: runtime error: unresolved import 'character'

Started by Monsieur OUXX, Thu 27/02/2014 16:31:38

Previous topic - Next topic

Monsieur OUXX

I had my game working fine.
Then I decided to tidy up my gazillion Editor folders and started moving assets around inside the game Editor: subfolders, etc.
Now I run my game and I get this : "script link failed: runtime error: unresolved import 'cMainCharacter'.

cMainCharacter is my main character in the game. It's character 0. It's still here, I can open it and view it.
Moreover, I believe character aliases are global (by AGS design). So I fail to see how it could not be imported somewhere.

Could AGS be complaining that this character is unknown to a specific script? Or is it complaining that the character doesn't exist altogether? I hope I didn't corrupt my game.


 

Khris

Did you make a backup before rearranging lots of things?

Monsieur OUXX

Quote from: Khris on Thu 27/02/2014 16:42:12
Did you make a backup before rearranging lots of things?

I have a backup, but from one week ago (a lot of things changed since then). I didn't think creating subfolders inside the game would cause issues :(  I could re-do everything Ive done since then, but if anyone has an idea of another possible cause for the issue, I'd be very happy.

EDIT: there must definitely be another cause, most likely a human mistake; I deleted that character and re-created it, the issue persists. Could this error happen if there is a mistake made at some point with SetAsPlayer, or if the character is not in the current room, etc.?

 

monkey0506

It's probably not recompiling the rooms properly. Have you tried doing a Rebuild all?

Monsieur OUXX

Quote from: monkey_05_06 on Thu 27/02/2014 17:14:38
It's probably not recompiling the rooms properly. Have you tried doing a Rebuild all?

I just tried. I really thought that would work, because I noticed that the rooms were not compiled in the same order as before (because of the folders I created), so I thought there was probably a dirty symbol "cMainCharacter" stuck in some chunk of formerly-compiled data...

...But the issue is still there :(
 

Monsieur OUXX

RESOLVED!

Here is what I did:
1) I re-built all the rooms, as recommended (I don't know if it helped but I'd rather mention it)
2) I closed and re-open AGS.
3) I compiled : the Editor complained that the game is set to start in room 0 (it didn't, before)
4) I opened my cMainCharacter and clicked on "Set as player character"
5) I ran the game and it ran fine.

Hurray!
 

SMF spam blocked by CleanTalk