AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   [HELP] "Metamod Attach Failed" (https://forums.alliedmods.net/showthread.php?t=94421)

MockingBird 06-11-2009 03:27

[HELP] "Metamod Attach Failed"
 
Hi all.

Im attempting to make an extension that requires metamod.

The extension compiles without error, however when it attempts to load on the server, I get this:
[SM] Unable to load extension "wc3.ext.dll": Metamod attach failed

Since the error message doesn't really tell you much, other than metamod failed (why?), Im not sure what I should post, and I dont think I should post all the code.

I am compiling with the same metamod as im running on.

Also, when I compile already made extensions (e.g, cstrike), I get the same error when SM attempts to load it, so I think theres something wrong with my visual studio. I followed all http://wiki.alliedmods.net/Writing_E..._Visual_Studio <-- those instructions.

Thanks in advanced.

bl4nk 06-11-2009 03:57

Re: [HELP] "Metamod Attach Failed"
 
Type "sm exts list" and then find the number of the extension and type "sm exts info #". It should tell you some more info on why it failed. The problem could be because you compiled the extension on a newer version of SM than you're running on your server, or vise-versa.

MockingBird 06-11-2009 08:38

Re: [HELP] "Metamod Attach Failed"
 
*rage*

I just saw that im compiling on 1.1.0, and running on 1.2.1.. which is strange cause i coulda sworn I updated the SDK and the server at the same time...

Ill update and see if this hopefully fixes it.

EDIT:
I just compiled with the new SDK, and I still got the same error.

I tried 'sm exts info', and got this:
sm exts info 9
File: wc3.ext.dll
Loaded: No (Metamod attach failed)

Again the error message doesn't really help.

Is there anything else I might be missing?

EDIT2:
I just tried the sample extension with the only thing changed being metamod enabled, and get the same error

Am I correct in assuming that if it compiles correctly, then all the files I needed are set up?

Fyren 06-11-2009 15:27

Re: [HELP] "Metamod Attach Failed"
 
Are you compiling against a newer version of MMS than the server is running?

If you're running this on CSS (you didn't mention) and using project files based on the samples, pick "old Metamod" as your config.

bl4nk 06-11-2009 18:43

Re: [HELP] "Metamod Attach Failed"
 
Err, yeah. I meant MM:S in my post, not SM.

MockingBird 06-12-2009 01:02

Re: [HELP] "Metamod Attach Failed"
 
Yes I am compiling for CSS.

Im using the same version.

Ill try with 'old metamod'.

Thanks :)

EDIT:
Ok thanks that worked on the sample plugin, but now I get an error saying that 'GetEngineFactory' in ISmmAPI does not exist. Is there an equivelant in the old metamod?

Thanks

bl4nk 06-12-2009 02:04

Re: [HELP] "Metamod Attach Failed"
 
That means you compiled on a newer version of SM than you're running on your server.

MockingBird 06-12-2009 06:09

Re: [HELP] "Metamod Attach Failed"
 
??

This is before I run it on the server.

I compiled the sample extension with metamod enabled, and it worked fine on the server.

Then when I tried my plugin, which uses GetEngineFactory, it doesn't compile at all (using metamod-old).

Im sure that both my metamod, and sourcemod, are up to date with the server.

Im guessing that it is just a different function name for the same thing in the legacy?

Thanks

DJ Tsunami 06-12-2009 06:46

Re: [HELP] "Metamod Attach Failed"
 
Yes, GetEngineFactory and GetServerFactory only exist in the MM:S 1.6 API. CS:S uses the MM:S 1.4 API, where those are engineFactory and serverFactory. To use the same code you can do this near the top of your .h/.cpp file:

Code:

#ifndef METAMOD_PLAPI_VERSION
#define GetEngineFactory engineFactory
#define GetServerFactory serverFactory
#endif

Also, I'd use the Episode 1 config for CS:S, not Old Metamod.

MockingBird 06-12-2009 11:15

Re: [HELP] "Metamod Attach Failed"
 
Thank you very much.

It doesn't work with the EP1 config unfortunately (Metamod doesnt attach).

Fyren 06-13-2009 21:26

Re: [HELP] "Metamod Attach Failed"
 
The EP1 config is not meant to work. There isn't currently support for using the new API with EP1 games, as far as I know, so you have to use the "old Metamod" config to have it use the old API.

DJ Tsunami 06-14-2009 06:11

Re: [HELP] "Metamod Attach Failed"
 
I'm pretty sure the EP1 config used core-legacy, but maybe I just changed that myself and forgot about it..

Greyscale 06-14-2009 21:49

Re: [HELP] "Metamod Attach Failed"
 
I had problems with this myself. I was using EP1 and metamod wouldn't attach. Old Metamod worked fine.


All times are GMT -4. The time now is 18:20.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.