I'm trying to hook SetKeyValue functions from IServerTools:
PHP Code:
virtual bool SetKeyValue( CBaseEntity *pEntity, const char *szField, const char *szValue ) = 0;
virtual bool SetKeyValue( CBaseEntity *pEntity, const char *szField, float flValue ) = 0;
virtual bool SetKeyValue( CBaseEntity *pEntity, const char *szField, const Vector &vecValue ) = 0;
If I hook only the first one, it goes fine, but for the second and third I get errors:
error: redefinition of '__SourceHook_FHCls_IServerToolsSetKeyValue0'
Though the functions are not the same and have different parameters.
What is the proper way to define them?
Here my corrent definitions:
PHP Code:
SH_DECL_HOOK3(IServerTools, SetKeyValue, SH_NOATTRIB, 0, bool, void *, const char *, const char * );
SH_DECL_HOOK3(IServerTools, SetKeyValue, SH_NOATTRIB, 0, bool, void *, const char *, float );
SH_DECL_HOOK3(IServerTools, SetKeyValue, SH_NOATTRIB, 0, bool, void *, const char *, const Vector & );