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

cant initialize IServerGameDLL!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Fix
Member
Join Date: Jun 2005
Old 12-28-2005 , 17:36   cant initialize IServerGameDLL!
Reply With Quote #1

why doesnt it work?

Code:
#include "server_class.h"
Code:
// Interfaces from the engine
IVEngineServer	*engine = NULL; // helper functions (messaging clients, loading content, making entities, running commands, etc)
IFileSystem		*filesystem = NULL; // file I/O 
IGameEventManager *gameeventmanager = NULL; // game events interface
IPlayerInfoManager *playerinfomanager = NULL; // game dll interface to interact with players
IBotManager *botmanager = NULL; // game dll interface to interact with bots
IServerPluginHelpers *helpers = NULL; // special 3rd party plugin helpers from the engine
IUniformRandomStream *randomStr = NULL;
IEngineTrace *enginetrace = NULL;

CGlobalVars *gpGlobals = NULL;

IServerGameDLL *servergamedll=NULL;
Code:
	// get the interfaces we want to use
	if(	!(engine = (IVEngineServer*)interfaceFactory(INTERFACEVERSION_VENGINESERVER, NULL)) ||
		!(gameeventmanager = (IGameEventManager *)interfaceFactory(INTERFACEVERSION_GAMEEVENTSMANAGER,NULL)) ||
		!(filesystem = (IFileSystem*)interfaceFactory(FILESYSTEM_INTERFACE_VERSION, NULL)) ||
		!(helpers = (IServerPluginHelpers*)interfaceFactory(INTERFACEVERSION_ISERVERPLUGINHELPERS, NULL)) || 
		!(enginetrace = (IEngineTrace *)interfaceFactory(INTERFACEVERSION_ENGINETRACE_SERVER,NULL)) ||
		!(servergamedll= (IServerGameDLL*)interfaceFactory("ServerGameDLL004",NULL)) ||
		!(randomStr = (IUniformRandomStream *)interfaceFactory(VENGINE_SERVER_RANDOM_INTERFACE_VERSION, NULL))
		)
	{
		return false; // we require all these interface to function
	}
returns false, so the plugin doesnt work anymore...
why doesnt this work?
Fix is offline
Send a message via ICQ to Fix Send a message via MSN to Fix
[email protected]
Member
Join Date: Dec 2005
Old 12-28-2005 , 18:35  
Reply With Quote #2

INTERFACEVERSION_SERVERGAMEDLL is defined as "ServerGameDLL003" which no longer is the correct version. Use "ServerGameDLL004" instead.
Lojo.jacob@gmail.com is offline
c0ldfyr3
AlliedModders Donor
Join Date: Aug 2005
Location: Ireland
Old 12-28-2005 , 19:49  
Reply With Quote #3

If you look at his code, he is..
__________________
c0ldfyr3 is offline
Send a message via MSN to c0ldfyr3 Send a message via Yahoo to c0ldfyr3
BAILOPAN
Join Date: Jan 2004
Old 12-28-2005 , 21:52  
Reply With Quote #4

maybe he should be using 003 instead... he didn't say what mod he was programming for.
__________________
egg
BAILOPAN is offline
c0ldfyr3
AlliedModders Donor
Join Date: Aug 2005
Location: Ireland
Old 12-28-2005 , 22:59  
Reply With Quote #5

CS:S, I was helping him earlier on MSN, and Im stumped on it too o.O

Twas I who told him use 004.
__________________
c0ldfyr3 is offline
Send a message via MSN to c0ldfyr3 Send a message via Yahoo to c0ldfyr3
L. Duke
Veteran Member
Join Date: Apr 2005
Location: Walla Walla
Old 12-29-2005 , 10:29  
Reply With Quote #6

How do you know it's the server game DLL interface? The code returns false if any of the interfaces don't load.

Sslice was saying on IRC that the IServerPluginHelpers interface wouldn't load for him any more. Maybe that is the problem.

I would check each one individually and to determine which one is failing.

Also, you should probably be using IGameEventManager2 (which will require you to change your AddListener lines in the plugin).
Code:
(gameeventmanager = (IGameEventManager2 *)interfaceFactory(INTERFACEVERSION_GAMEEVENTSMANAGER2,NULL))
Make sure you change your class declaration to inherit IGameEventListener2.
L. Duke is offline
c0ldfyr3
AlliedModders Donor
Join Date: Aug 2005
Location: Ireland
Old 12-29-2005 , 11:32  
Reply With Quote #7

I *think* it was working for him before he added that line.

He had it on its own first, with a warning if it didnt init but he didnt stop the plugin loading so it was crashing when he used IServerGameDLL.

So, to tidy it up I told him put it there.
__________________
c0ldfyr3 is offline
Send a message via MSN to c0ldfyr3 Send a message via Yahoo to c0ldfyr3
Fix
Member
Join Date: Jun 2005
Old 12-29-2005 , 11:32  
Reply With Quote #8

if i remove the severgamedll line in the if() it works fine
it is this and nothing else ;)
i also added today IEngineSound and it works fine.
why does the IServerGameDLL not work?

and wtf is eventmanager2`?
Fix is offline
Send a message via ICQ to Fix Send a message via MSN to Fix
Mani
Veteran Member
Join Date: Dec 2004
Location: UK
Old 12-29-2005 , 12:37  
Reply With Quote #9

Try using

gameServerFactory

instead of interfaceFactory

Code:
serverdll = (IServerGameDLL*) gameServerFactory("ServerGameDLL004", NULL);
Mani
__________________
Installation files, documentation and help can be found at: -

www.mani-admin-plugin.com
Mani is offline
Fix
Member
Join Date: Jun 2005
Old 12-29-2005 , 16:36  
Reply With Quote #10

boah thank you very much mani, youre my hero!
IT WORKS!!!!!
COOOOOOOOOOL
THXTHXTHX
Fix is offline
Send a message via ICQ to Fix Send a message via MSN to Fix
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 06:51.


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