Raised This Month: $51 Target: $400
 12% 

[HELP] "Metamod Attach Failed"


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MockingBird
Member
Join Date: Mar 2005
Old 06-11-2009 , 03:27   [HELP] "Metamod Attach Failed"
Reply With Quote #1

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.
MockingBird is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 06-11-2009 , 03:57   Re: [HELP] "Metamod Attach Failed"
Reply With Quote #2

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.
bl4nk is offline
MockingBird
Member
Join Date: Mar 2005
Old 06-11-2009 , 08:38   Re: [HELP] "Metamod Attach Failed"
Reply With Quote #3

*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?

Last edited by MockingBird; 06-11-2009 at 09:16.
MockingBird is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 06-11-2009 , 15:27   Re: [HELP] "Metamod Attach Failed"
Reply With Quote #4

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.
Fyren is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 06-11-2009 , 18:43   Re: [HELP] "Metamod Attach Failed"
Reply With Quote #5

Err, yeah. I meant MM:S in my post, not SM.
bl4nk is offline
MockingBird
Member
Join Date: Mar 2005
Old 06-12-2009 , 01:02   Re: [HELP] "Metamod Attach Failed"
Reply With Quote #6

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

Last edited by MockingBird; 06-12-2009 at 01:08.
MockingBird is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 06-12-2009 , 02:04   Re: [HELP] "Metamod Attach Failed"
Reply With Quote #7

That means you compiled on a newer version of SM than you're running on your server.
bl4nk is offline
MockingBird
Member
Join Date: Mar 2005
Old 06-12-2009 , 06:09   Re: [HELP] "Metamod Attach Failed"
Reply With Quote #8

??

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
MockingBird is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 06-12-2009 , 06:46   Re: [HELP] "Metamod Attach Failed"
Reply With Quote #9

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.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.

Last edited by DJ Tsunami; 06-12-2009 at 06:49.
DJ Tsunami is offline
MockingBird
Member
Join Date: Mar 2005
Old 06-12-2009 , 11:15   Re: [HELP] "Metamod Attach Failed"
Reply With Quote #10

Thank you very much.

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



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:05.


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