Skip to content
Guest Big Announcement

Game crashing after a hook

Featured Replies

So there is a function in a class called

protected float get_Damage(); // RVA 0x101510283 Offset: 0x1510283

I’m using a textfield to modify the function  

This is my code

float(*old_get_damage)(void *ok, float damage);

float get_damage(void *ok, float damage) {

 

float customDamage = [[switches getValueFromSwitch:@"Set Damage"] floatValue];

 

if([switches isSwitchOn:@"Set Damage"]) {

damage = customDamage;

return damage;

}

return old_get_damage(ok,damage);

}

 

void setup() {

 

HOOK(0x101510283,get_damage,old_get_damage);

im not sure if it’s because of my return old_get_damage(ok,damage); statement but the game always crashes after my character attacks. Sometimes it works and my character one hits but then it crashes after 10 seconds. When the switch is off it crashes as well.

Updated by Wayhaysoe

Archived

This topic is now archived and is closed to further replies.

Featured Content

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.