Jump to content

error: use of undeclared identifier 'mp'


Go to solution Solved by Sakanya,

3 posts in this topic

Recommended Posts

Posted

Heya

 

So I'm trying to add a hook into the MM, since this worked on shmoo's MM, but the mm is buggy, I wanna do it on Arthurs.

 

This is the code I'm using:

    int (*orig_func)(void *self);

    int new_func(void *self)
    {
        
        BOOL featureIsActive = [menu getBool:@"k02BasicSwitcher"];
        
        if (featureIsActive)
            return 999999;
        else
            return orig_func(self);
    }

%ctor
{
    NSDictionary *hacks =
    @{

        @"k02BasicSwitcher":@{
            @"offsets": @[@"0x0ffset"],
            @"desc": @"This will make the enemy dead within one hit.",
            @"label": @"One Hit Kill"
            },
    };


MSHookFunction((void*)[mp calculateAddress:0x0ffset], (void*)new_func, (void**)&orig_func);

 

What's wrong?

Why I'm getting the error?

  • Solution
Posted (edited)

You're getting this error because the given example for hooking has not been updated to conform with the rest of the changes made to the library and template.

 

You can work around this issue by trying the following :

// You must do this if you're working with a 64-bit binary because of ASLR
MSHookFunction((void*)(_dyld_get_image_vmaddr_slide(0) + 0x000000000), (void*)newFunction, (void**)&oldFunction);

//Otherwise, you can omit "_dyld_get_image_vmaddr_slide(0)"
MSHookFunction((void*)(0x000000000), (void*)newFunction, (void**)&oldFunction);

 

Moreover, if you're only applying a hook, you don't need to define offsets or patches. All you need is the label and description.

Updated by Sakanya
Removed unnecessary comma.
Posted
On 1-11-2017 at 2:38 AM, Sakanya said:

You're getting this error because the given example for hooking has not been updated to conform with the rest of the changes made to the library and template.

 

You can work around this issue by trying the following :


// You must do this if you're working with a 64-bit binary because of ASLR
MSHookFunction((void*)(_dyld_get_image_vmaddr_slide(0) + 0x000000000), (void*)newFunction, (void**)&oldFunction);

//Otherwise, you can omit "_dyld_get_image_vmaddr_slide(0)"
MSHookFunction((void*)(0x000000000), (void*)newFunction, (void**)&oldFunction);

 

Moreover, if you're only applying a hook, you don't need to define offsets or patches. All you need is the label and description.

Never saw someone answered this. I just tried it & worked perfectly. 

Thankyou!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Our picks

    • Triple Fantasy v7.81.0 +2 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Triple Fantasy By Gameplete
      Bundle ID: com.Gameplete.CardFantasy
      iTunes Store Link: https://apps.apple.com/us/app/triple-fantasy/id1018725872?uo=4

       


      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      • 6 replies
    • Triple Fantasy v7.81.0 +2 Cheats [ Damage & Defence ]
      Modded/Hacked App: Triple Fantasy By Gameplete
      Bundle ID: com.Gameplete.CardFantasy
      iTunes Store Link: https://apps.apple.com/us/app/triple-fantasy/id1018725872?uo=4

       


      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      • 4 replies
    • Tiny Defense - Tower Defense v0.3.0 [ +9 Cheats ] Currency Max
      Modded/Hacked App: Tiny Defense - Tower Defense By jeongwoo park
      Bundle ID: com.bumbloo.tinydefense
      App Store Link: https://apps.apple.com/us/app/tiny-defense-tower-defense/id6520386369?uo=4

       

      🤩 Hack Features

      - Gems

      - Coins

      - Energy

      - Battle Coins

      - Fingerprint Box Coins

      - Premium Box

      - Common Box

      - ATK

      - ATK Speed

      Disable Currency After Hack
      • 6 replies
    • Tiny Defense - Tower Defense v0.3.0 [ +9 Jailed ] Currency Max
      Modded/Hacked App: Tiny Defense - Tower Defense By jeongwoo park
      Bundle ID: com.bumbloo.tinydefense
      App Store Link: https://apps.apple.com/us/app/tiny-defense-tower-defense/id6520386369?uo=4
       

      🤩 Hack Features

      - Gems

      - Coins

      - Energy

      - Battle Coins

      - Fingerprint Box Coins

      - Premium Box

      - Common Box

      - ATK

      - ATK Speed

      Disable Currency After Hack
      • 1 reply
    • Cup Quest - Hero's Journey v1.3 [+3 Cheats]
      Modded/Hacked App: Cup Quest - Hero's Journey By DOGSTER TECHNOLOGIES PRIVATE LIMITED
      Bundle ID: com.felicity.cupquest
      App Store Link: https://apps.apple.com/us/app/cup-quest-heros-journey/id6742395137?uo=4



      🤩 Hack Features

      - One Hit Kill
      - Add Currency
      - Unlock Double Speed
      • 2 replies
    • Cup Quest - Hero's Journey v1.3 [+3 Jailed Cheats]
      Modded/Hacked App: Cup Quest - Hero's Journey By DOGSTER TECHNOLOGIES PRIVATE LIMITED
      Bundle ID: com.felicity.cupquest
      App Store Link: https://apps.apple.com/us/app/cup-quest-heros-journey/id6742395137?uo=4



      🤩 Hack Features

      - One Hit Kill
      - Add Currency
      - Unlock Double Speed
      • 1 reply
    • Idle Dungeon Manager v1.7.6 [ +5 Cheats ] Currency Max
      Modded/Hacked App: Idle Dungeon Manager By ColdFire Games GmbH
      Bundle ID: com.coldfiregames.dungeon.manager.tycoon.idle.game
      App Store Link: https://apps.apple.com/us/app/idle-dungeon-manager/id1538761888?uo=4


      🤩 Hack Features

      - ADS NO [ Rewards Free ]

      - Currency

      - Resources

      - Stars

      - ATK HP SH [ Hero Up ] Tested Not
      • 0 replies
    • Idle Dungeon Manager v1.7.6 [ +5 Jailed ] Currency Max
      Modded/Hacked App: Idle Dungeon Manager By ColdFire Games GmbH
      Bundle ID: com.coldfiregames.dungeon.manager.tycoon.idle.game
      App Store Link: https://apps.apple.com/us/app/idle-dungeon-manager/id1538761888?uo=4
       

      🤩 Hack Features

      - ADS NO [ Rewards Free ]

      - Currency

      - Resources

      - Stars

      - ATK HP SH [ Hero Up ] Tested Not
      • 2 replies
    • Knights of Pen and Paper 3 v1.4.1 [+5 Cheats]
      Modded/Hacked App: Knights of Pen and Paper 3 By Northica Oy
      Bundle ID: com.northicagames.kopp3
      App Store Link: https://apps.apple.com/us/app/knights-of-pen-and-paper-3/id6462194230?uo=4



      🤩 Hack Features

      - High Gold Gain (Enable and Win Fight)
      - Always Can Claim Achievements
      - Auto Win (Enable inside battle)
      - Level Up Characters (Enable and your heroes levels up)
      - Max Level Equipments (Enable and all equipments will be max level)

      • 0 replies
    • Knights of Pen and Paper 3 v1.4.1 [+5 Jailed Cheats]
      Modded/Hacked App: Knights of Pen and Paper 3 By Northica Oy
      Bundle ID: com.northicagames.kopp3
      App Store Link: https://apps.apple.com/us/app/knights-of-pen-and-paper-3/id6462194230?uo=4



      🤩 Hack Features

      - High Gold Gain (Enable and Win Fight)
      - Always Can Claim Achievements
      - Auto Win (Enable inside battle)
      - Level Up Characters (Enable and your heroes levels up)
      - Max Level Equipments (Enable and all equipments will be max level)

      • 1 reply
    • Eternium Cheats v1.34.12 +11
      Modded/Hacked App: Eternium By Making Fun, Inc.
      Bundle ID: com.makingfun.mageandminions
      iTunes Store Link: https://apps.apple.com/us/app/eternium/id579931356?uo=4

       

      📌 Mod Requirements

      - Jailbroken iPhone or iPad.
      - iGameGod / Filza / iMazing.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak (from Sileo, Cydia or Zebra).

       

      🤩 Hack Features

      - 5K Gems When Completed Stage
      - Infinite Gold
      - Infinite Cosmetic
      - Infinite Yellow Stone
      - Multiply Attack (Linked with Enemy)
      - No Skills Cooldown
      - No Consumable Cooldown
      - Multiply Attack Speed
      - Instant Regen Health
      - Always Crit
      - Material Drops (When you killed an Enemy it will drop materials for crafts)



      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/194526-eternium-cheats-v13355-6/
      • 40 replies
    • June’s Journey: Hidden Objects v3.34.4 Jailed Cheats +2
      Modded/Hacked App: June’s Journey: Hidden Objects By wooga gmbh
      Bundle ID: net.wooga.junes-journey-hidden-object-mystery-game
      iTunes Store Link: https://apps.apple.com/us/app/junes-journey-hidden-objects/id1200391796?uo=4


      Hack Features:
      - Infinite Currencies
      - Instant Hint


      iOS Hack Download IPA Link: https://iosgods.com/topic/176104-june%E2%80%99s-journey-hidden-objects-v2946-jailed-cheats-2/
      • 42 replies
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines