I'll be straight forward here is the code.
Here is my MShook look like
generated error :
"No matching function for call to (getAbsoluteAddress) "
"candidate function not viable: requires 2 arguments but 1 was provided "
Then I clicked on second error, it show me these code in Utils.h
Idk what I'm doing wrong but the last time I was using lgl was on version 2.8 and everything was fine.
C++:
int (*old_get_Coin)(void *instance);
int get_Coin(void *instance) {
if (instance != NULL && coin){ //check if instance not null and coin is true
return 888888; //if instance not null and coin is true then return 888888
}
return old_get_Coin(instance); //if NULL and/or coin is false then return old value
}
C++:
MSHookFunction((void*)getAbsoluteAddress(0x436BC7), (void*)get_Coin, (void**)&old_get_Coin);
"No matching function for call to (getAbsoluteAddress) "
"candidate function not viable: requires 2 arguments but 1 was provided "
Then I clicked on second error, it show me these code in Utils.h
Code:
DWORD getAbsoluteAddress(const char *libraryName, DWORD relativeAddr) {
libBase = findLibrary(libraryName);
if (libBase == 0)
return 0;
return (reinterpret_cast<DWORD>(libBase + relativeAddr));
}