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

SourceHook compile errors


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
client21
Senior Member
Join Date: Apr 2013
Old 06-04-2018 , 02:17   SourceHook compile errors
Reply With Quote #1

PHP Code:
class TEST : public SDKExtension
{
public:
    
virtual bool SDK_OnMetamodLoad(ISmmAPI *ismmchar *errorsize_t maxlengthbool late);
    
void Hook_ClientActive(edict_t *pEntitybool bLoadGame);
};

IServerGameClients *gameclients NULL;

TEST g_Test;
SMEXT_LINK(&g_Test);

bool TEST::SDK_OnMetamodLoad(ISmmAPI *ismmchar *errorsize_t maxlengthbool late)
{
    
// Error    2    error C2065: 'id' : undeclared identifier
    
PLUGIN_SAVEVARS();

    
// Error    3    error C2065: 'maxlen' : undeclared identifier
    
GET_V_IFACE_ANY(GetServerFactorygameclientsIServerGameClientsINTERFACEVERSION_SERVERGAMECLIENTS);
    
    
// Error    4    error C3861: '__SourceHook_FHAddIServerGameClientsClientActive': identifier not found
    
SH_ADD_HOOK(IServerGameClientsClientActivegameclientsSH_MEMBER(this, &TEST::Hook_ClientActive), true);
    
    return 
true;
}

void TEST::Hook_ClientActive(edict_t *pEntitybool bLoadGame)
{
    
g_pSM->LogError(myself"Hook_ClientActive(%d, %d)"gamehelpers->IndexOfEdict(pEntity), bLoadGame);

Why?
client21 is offline
 



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:56.


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