HekaHeka709
Solid & Active Platinian
Hello dear community,
I have this code
void *Inst;
void (*AddMoneyExample)(void *instance, int amount);
void _AddMoneyExample(void *instance, int amount) {
if (instance != NULL) {
Inst = instance;
}
AddMoneyExample(instance, amount);
}
It gets instance when AddMoney is called. It does work but can i get the address of instance so that function pointer works even addmoney is not called?
I'll wait for help thank you in advance
I have this code
void *Inst;
void (*AddMoneyExample)(void *instance, int amount);
void _AddMoneyExample(void *instance, int amount) {
if (instance != NULL) {
Inst = instance;
}
AddMoneyExample(instance, amount);
}
It gets instance when AddMoney is called. It does work but can i get the address of instance so that function pointer works even addmoney is not called?
I'll wait for help thank you in advance