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

"abstract class" error on orangebox


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Chrisber
AlliedModders Donor
Join Date: Jul 2007
Location: localhost
Old 08-04-2009 , 12:50   "abstract class" error on orangebox
Reply With Quote #1

Hi.
I'm currently completly rewriting my plugin and I want to add support for OB.
After I spend a lot of time to make all code compatible, now there is one error which I can't get rid of.
Code:
'CNativeTools': Instanz von abstrakter Klasse kann nicht erstellt werden
Translated to english:
Code:
'CNativeTools': Instance of abstract class can not be created
This error only appears when I'm releasing on OB engine, with EP1 it works fine. Nowhere in my code is the word "abstract" so I think it comes either from MM:S or the OB SDK.

This is how my mainclass is defined:
Code:
#ifdef SMM
    class CNativeTools: public ISmmPlugin, public IMetamodListener, public IGameEventListener2
#else
    class CNativeTools: public IServerPluginCallbacks, public IGameEventListener2
#endif
And here it is call code:
Code:
CNativeTools gNativeToolsInst;
I hope someone can tell me why that error appears and how I can fix it

~ Chris
Chrisber is offline
Keeper
Senior Member
Join Date: Nov 2006
Old 08-04-2009 , 13:06   Re: "abstract class" error on orangebox
Reply With Quote #2

Take a look at those interfaces.

For example: IServerPluginCallbacks has a method defined in OB that's not there in EP1.
Code:
virtual void            OnQueryCvarValueFinished
Since IServerPluginCallbacks is an abstract_class you will have to define a body for that method, otherwise you get this error.
Keeper is offline
Chrisber
AlliedModders Donor
Join Date: Jul 2007
Location: localhost
Old 08-04-2009 , 13:33   Re: "abstract class" error on orangebox
Reply With Quote #3

WOOT!
It works.
Thank you very much

~ Chris
Chrisber 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 18:18.


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