Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Rivereyes on Tue 22/03/2022 15:06:57

Title: 'Unresolved import. AGS2Client SetAchievementAchieved^'
Post by: Rivereyes on Tue 22/03/2022 15:06:57
Hi all,

Apologies for the 'civilian' post, but I'm looking to help out a friend.

They are trying to launch the GoG.com version of Guard Duty on Win10 and they keep getting the following error message on launch :

Loading game failed with error. Script link failed. Runtime error. Unresolved import. AGS2Client SetAchievementAchieved^

They've tried setting different compatibility modes for the executable to no avail. They also currently have another AGS game (Strangeland) installed. Is it possible that there's some registry conflict between the two?

Any help would be greatly appreciated!
Title: Re: 'Unresolved import. AGS2Client SetAchievementAchieved^'
Post by: Khris on Tue 22/03/2022 15:24:42
Sounds like maybe their Antivirus removed a dll from the game folder?
Title: Re: 'Unresolved import. AGS2Client SetAchievementAchieved^'
Post by: eri0o on Tue 22/03/2022 16:06:29
It's probably what Khris mentioned.

I am curious, in the message is there a number after the ^ symbol?
Title: Re: 'Unresolved import. AGS2Client SetAchievementAchieved^'
Post by: nikolaelf on Tue 22/03/2022 16:53:19
Yes there is a number. Number "1'".

My antivirus is Windows Defender.
Title: Re: 'Unresolved import. AGS2Client SetAchievementAchieved^'
Post by: Khris on Tue 22/03/2022 17:23:58
Check the "threat history" (or similar) for Defender quarantining a file from the game's folder. Also try reinstalling it.
Title: Re: 'Unresolved import. AGS2Client SetAchievementAchieved^'
Post by: nikolaelf on Tue 22/03/2022 17:27:44
I have checked it. Nothing appears.

I also checked malwarebytes premium just in case. Nothing there, too.

I did a verify/repair action.

Do you think I have to reinstall it?
Title: Re: 'Unresolved import. AGS2Client SetAchievementAchieved^'
Post by: eri0o on Tue 22/03/2022 18:04:56
This error means it's complaining of a library named AGS2Client.dll in the same directory of Guard Duty I think. Is this dll there?
Title: Re: 'Unresolved import. AGS2Client SetAchievementAchieved^'
Post by: nikolaelf on Tue 22/03/2022 18:08:59
No. it's not!

There is an "agsgalaxy.dll" NOT a "AGS2Client".

How can I get it, please?
Title: Re: 'Unresolved import. AGS2Client SetAchievementAchieved^'
Post by: Khris on Tue 22/03/2022 20:16:10
Did you try reinstalling it? It's the obvious first step and only takes a few minutes.
Title: Re: 'Unresolved import. AGS2Client SetAchievementAchieved^'
Post by: nikolaelf on Tue 22/03/2022 20:41:11
No.

I did a verify/repair action.

I was watching the game folder at the same time but the particular dll didn’t appear when repairing.

I am afraid if I’ll reinstall the game, it might not install the dll again.

Maybe I’m wrong.
Title: Re: 'Unresolved import. AGS2Client SetAchievementAchieved^'
Post by: Crimson Wizard on Tue 22/03/2022 20:42:47
Quote from: nikolaelf on Tue 22/03/2022 18:08:59
AGS2Client SetAchievementAchieved^

Quote from: nikolaelf on Tue 22/03/2022 18:08:59
There is an "agsgalaxy.dll" NOT a "AGS2Client".

If i remember correctly, agsgalaxy.dll is a plugin specialized for GoG releases instead of steam plugin, and it is supposed to contain achievement functions.
If engine cannot find these, this could mean either that engine failed to load the agsgalaxy.dll for some reason, or agsgalaxy.dll is of some incorrect version, mismatching the game's script.

Is it possible to find out, which version of the engine was used when making this game? If game has "winsetup.exe", it should be written at the bottom of the setup dialog. Also, pressing Ctrl+Alt+V in game should print engine info.
Have you tried reporting this problem to the game author or publisher? is it confirmed that this particular release is working at least for some people?
Title: Re: 'Unresolved import. AGS2Client SetAchievementAchieved^'
Post by: Crimson Wizard on Tue 22/03/2022 20:48:04
Quote from: nikolaelf on Tue 22/03/2022 20:41:11
I am afraid if I’ll reinstall the game, it might not install the dll again.

I don't think you should be afraid of that; but agsgalaxy.dll is also available for download separately iirc; it's not made by the game authors, but by a separate developer and used by game makers for GoG releases.
Title: Re: 'Unresolved import. AGS2Client SetAchievementAchieved^'
Post by: nikolaelf on Tue 22/03/2022 20:54:09
I can tell you tomorrow which version is depicted because I’m not in front of the pc.

I have reported the problem to game author but no answer yet.

The game is working for some people.

As far as I can understand the issue is the missing of the AGS2Client.dll NOT the agsgalaxy.dll which already exists.
Title: Re: 'Unresolved import. AGS2Client SetAchievementAchieved^'
Post by: Crimson Wizard on Tue 22/03/2022 21:06:04
Right, sorry, it should be AGS2Client.dll, which probably uses agsgalaxy.dll in turn (game -> ags2client.dll -> agsgalaxy.dll).

If reinstalling does not work, it should be possible to download it separately, but I failed to find actual download link right now; maybe someone else could post it.
Title: Re: 'Unresolved import. AGS2Client SetAchievementAchieved^'
Post by: nikolaelf on Tue 22/03/2022 21:09:02
Me neither.

If someone could post a link I would be grateful.
Title: Re: 'Unresolved import. AGS2Client SetAchievementAchieved^'
Post by: Khris on Tue 22/03/2022 22:28:39
Why would you have to look for an obscure dll after buying an installer for a game?
To me it sounds like the installer itself is the issue here; maybe it accidentally ended up with the wrong batch of files after an update or something.

Chicky (https://www.adventuregamestudio.co.uk/forums/index.php?action=profile;u=1074) was last active in the forums today, so he should react to a PM.
Title: Re: 'Unresolved import. AGS2Client SetAchievementAchieved^'
Post by: Chicky on Wed 23/03/2022 00:48:24
Hey yeah, logged in to touch base about this issue but the user has contacted me via email so we're working through it there. I'm actually on holiday at the moment camping so internet access is hit and miss.

It's weird, the GOG version hasn't been updated in a couple of years now and this is the first report I've had of the issue. I'll update this post when we find the cause.
Title: Re: 'Unresolved import. AGS2Client SetAchievementAchieved^'
Post by: nikolaelf on Wed 23/03/2022 13:34:01
By the way, I reinstalled the game and I get the same error.

:sad:

(I installed the game while the antivirus was inactive).

@Crimson Wizard - Version Of The Engine3.4.1.14
Title: Re: 'Unresolved import. AGS2Client SetAchievementAchieved^'
Post by: eri0o on Wed 23/03/2022 19:37:13
If you don't need the gog connection you can just run in the latest AGS stable engine and it should probably run alright - I think we added stubs for AGS2Client. But it's weird that the dll isn't there.
Title: Re: 'Unresolved import. AGS2Client SetAchievementAchieved^'
Post by: nikolaelf on Thu 24/03/2022 17:39:39
Maybe it’s not there because it’s not in the gog game file in the first place.

I can’t think of anything else.

I’m really depressed by all this, really.
Title: Re: 'Unresolved import. AGS2Client SetAchievementAchieved^'
Post by: nikolaelf on Sat 26/03/2022 19:27:47
GOG suggested that I have to download direct x June 2010 runtime package amongst other things.

The game “Guard Duty” uses direct x 8.0.

As I recall, I have played some months ago “Strangeland”, which uses direct x 5.0 or above. But I played it without any problems or errors.

So, is it wise to download this package?

I have direct x 12 installed as well as redistributables 2015 and later versions installed, too.

Title: Re: 'Unresolved import. AGS2Client SetAchievementAchieved^'
Post by: Crimson Wizard on Sat 26/03/2022 20:15:04
@nikolaelf, until the game author answered anything, you may try running the game with the newer version of the engine, as suggested by eri0o in a comment above. As the newer engine has placeholders for these achievements functions, which means that the game may run without necessary dlls, but achievements wont work.

If such approach sounds fine to you, you may download this latest stable version of AGS (the game creation tool):
https://github.com/adventuregamestudio/ags/releases/download/v.3.5.1.16/AGS-3.5.1.16-P9.zip

you dont have to install the tool itself, but extract only 1 file called "acwin.exe". This file is the game engine runtime (it's a part of every game made with AGS).
Copy that file to the game's folder, and run it instead of the game's exe.

This is not a very "pretty" way to run the games, but may be used as a temporary solution, until the author or someone else solve your issue.


Regarding directX, AGS engine requires DirectX 9.0 to use Direct3D renderer, and DirectX 5.0 minimal to use "Software" renderer. DirectX 9.0 may be installed in parallel with DirectX 12. I dont think there will be any issues there, in the worst case you'll have a useless program on your PC, which you may uninstall later.
But I doubt this will help with the missing or non-working dll.
Title: Re: 'Unresolved import. AGS2Client SetAchievementAchieved^'
Post by: nikolaelf on Sun 27/03/2022 10:14:46
Dear Crimson, it worked!

I ran the acwin.exe and everything works fine!

Thank you so much!
Title: Re: 'Unresolved import. AGS2Client SetAchievementAchieved^'
Post by: Chicky on Sun 27/03/2022 13:05:45
Thanks for the help all.