This is the AMP version of this page.
If you want to load the real page instead, click this text.

Help! Does anyone know why my hook doesn't work?

Master TK

Platinian
Can anyone tell me what I did wrong?
C++:
bool AddLevel


void (*uplevel)(void *instance, int value);
void (*old_levelup)(void *instance);
void levelup(void *instance) {
if (instance != NULL) {
    if (AddLevel) {
uplevel(instance, 1);
  }
}
old_levelup(instance);
}


uplevel = (void(*)(void *,int))getAbsoluteAddress("libil2cpp.so", 0xA62594);
   HOOK_LIB("libil2cpp.so","0xA64C08", levelup, old_levelup);


   OBFUSCATE("99_CollapseAdd_Button_Add Level"),


     case 99:
            AddLevel = boolean;
            break;
 
C++:
void (*uplevel)(void *instance,int value);
void (*old_levelup)(void *instance);
void levelup(void *instance) {
if (instance != NULL) {
    if (AddLevel) {
        AddLevel = false;
        uplevel(instance, 9999);
  }
}
old_levelup(instance);
}

case:
    AddLevel = true;
break:
 
C++:
bool AddLevel = false;


void (*uplevel)(void *instance, int value);

void (*old_levelup)(void *instance);
void levelup(void *instance) {
if (instance != NULL) {
    if (AddLevel) {
uplevel(instance, 1);
  }
}
old_levelup(instance);
}


uplevel = (void(*)(void *,int))getAbsoluteAddress("libil2cpp.so", 0xA62594);
   HOOK_LIB("libil2cpp.so","0xA64C08", levelup, old_levelup);


   OBFUSCATE("99_CollapseAdd_Toggle_Add Level"),


     case 99:
            AddLevel = boolean;
            break;