Jump to content

error: %end does not make sense inside a block


Go to solution Solved by imp0ss1ble,

10 posts in this topic

Recommended Posts

Posted
Good evening guys, I keep getting this error while trying to compile a hack with preference bundle.
Tweak.xm:20: error: %end does not make sense inside a block make[2]: *** [obj/Tweak.xm.0d97521c.o] Error 255 make[1]: *** [internal-library-all_] Error 2 make: *** [LikeHubUltimate.all.tweak.variables] Error 2 

Is there anything wrong in this?
#define PLIST_PATH @"/var/mobile/Library/Preferences/prefbundle.plist"
 
inline bool GetPrefBool(NSString *key)
{
return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];
}
 
%hook LikeHubUser
- (void)setCoins:(long) arg1 {
if(GetPrefBool(@"ksetCoin")) {
arg1 = 900;
%orig (arg1);
}
- (long)coins {
if(GetPrefBool(@"kCoin")) {
return 900;
}
return %orig;
}
%end
%hook MATUtils
+ (BOOL)checkJailBreak {
if(GetPrefBool (@"kcheckJailBreak")) {
return false;
}
return %orig;
}
%end 
%hook SPJailbreakStatusProvider
+ (BOOL)isJailbroken {
if(GetPrefBool(@"kisJailbroken")) {
return false;
}
return %orig;
}

 

%end
Posted

Your problem is in the first %hook. You haven't closed a {.

  • Solution
Posted
#define PLIST_PATH @"/var/mobile/Library/Preferences/prefbundle.plist"

 

inline bool GetPrefBool(NSString *key)

{

return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];

}

 

%hook LikeHubUser

- (void)setCoins:(long) arg1 {

if(GetPrefBool(@"ksetCoin")) {

arg1 = 900;

}

%orig (arg1);

}

- (long)coins {

if(GetPrefBool(@"kCoin")) {

return 900;

}

return %orig;

}

%end

%hook MATUtils

+ (BOOL)checkJailBreak {

if(GetPrefBool (@"kcheckJailBreak")) {

return false;

}

return %orig;

}

%end 

%hook SPJailbreakStatusProvider

+ (BOOL)isJailbroken {

if(GetPrefBool(@"kisJailbroken")) {

return false;

}

return %orig;

}

 


%end

Posted (edited)

No the first should look like this

%hook LikeHubUser
- (void)setCoins:(long) arg1 {
if(GetPrefBool(@"ksetCoin")) {
arg1 = 900;
%orig (arg1);
}
return %orig
}
^_^ Updated by ITz_kser
Posted

Like this:

 

%hook LikeHubUser

- (void)setCoins:(long) arg1 {

if(GetPrefBool(@"ksetCoin")) {

arg1 = 900;

%orig (arg1);

}

return %orig;

}

- (long)coins {

if(GetPrefBool(@"kCoin")) {

return 900;

}

return %orig;

}

%end

%hook MATUtils

+ (BOOL)checkJailBreak {

if(GetPrefBool (@"kcheckJailBreak")) {

return false;

}

return %orig;

}

%end

%hook SPJailbreakStatusProvider

+ (BOOL)isJailbroken {

if(GetPrefBool(@"kisJailbroken")) {

return false;

}

return %orig;

}

 

%end

Posted (edited)

 

#define PLIST_PATH @"/var/mobile/Library/Preferences/prefbundle.plist"
 
inline bool GetPrefBool(NSString *key)
{
return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];
}
 
%hook LikeHubUser
- (void)setCoins:(long) arg1 {
if(GetPrefBool(@"ksetCoin")) {
arg1 = 900;
}
%orig (arg1);
}
- (long)coins {
if(GetPrefBool(@"kCoin")) {
return 900;
}
return %orig;
}
%end
%hook MATUtils
+ (BOOL)checkJailBreak {
if(GetPrefBool (@"kcheckJailBreak")) {
return false;
}
return %orig;
}
%end 
%hook SPJailbreakStatusProvider
+ (BOOL)isJailbroken {
if(GetPrefBool(@"kisJailbroken")) {
return false;
}
return %orig;
}

 

%end

 

 

 

 

It worked perfectly. Thanks impossible and all of you for your support!

Updated by KonpresoR

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

    • Obsidian Knight RPG v1.200.12 [+3 Jailed Cheats]
      Modded/Hacked App: Obsidian Knight RPG By ActFirst Games AB
      Bundle ID: com.actfirstgames.obsidianknight
      iTunes Store Link: https://apps.apple.com/us/app/obsidian-knight-rpg/id6505061490?uo=4



      🚀 Hack Features

      - Unlimited Currency
      - God Mode / Never Die
      - High Damage / OHK
        • Like
      • 30 replies
    • Obsidian Knight RPG v1.200.12 [+3 Cheats]
      Modded/Hacked App: Obsidian Knight RPG By ActFirst Games AB
      Bundle ID: com.actfirstgames.obsidianknight
      iTunes Store Link: https://apps.apple.com/us/app/obsidian-knight-rpg/id6505061490?uo=4

       

      🚀 Hack Features

      - Unlimited Currency
      - God Mode / Never Die
      - High Damage / OHK
      • 31 replies
    • Margonem Adventures v2.4.6 [+3 Jailed Cheats]
      Modded/Hacked App: Margonem Adventures By GARMORY sp. z o.o. sp. k.
      Bundle ID: pl.Garmory.MargonemAdventures
      iTunes Store Link: https://apps.apple.com/us/app/margonem-adventures/id6444410609?uo=4

       

      🤩 Hack Features

      - Enemy Can't Move
      - Enemy Can't Attack
      - Unlimited Mana
      • 24 replies
    • Margonem Adventures v2.4.6 [+3 Cheats]
      Modded/Hacked App: Margonem Adventures By GARMORY sp. z o.o. sp. k.
      Bundle ID: pl.Garmory.MargonemAdventures
      iTunes Store Link: https://apps.apple.com/us/app/margonem-adventures/id6444410609?uo=4



      🤩 Hack Features

      - Enemy Can't Move
      - Enemy Can't Attack
      - Unlimited Mana
      • 16 replies
    • Pal Go: Tower Defense TD v0.4.51 [+7 Cheats]
      Modded/Hacked App: Pal Go: Tower Defense TD By Playwind Ltd
      Bundle ID: com.playwindgames.freedefender
      iTunes Store Link: https://apps.apple.com/us/app/pal-go-tower-defense-td/id6479316663?uo=4


       

      🚀 Hack Features

      - [VIP] Freeze Currency (Currency will not decrease when used)

      - [VIP] Currency Always Enough (Buy even when you don't have enough currency)

      - [Free] Higher Recruit Energy (Gives 500 Recruit Energy Every Wave)

      - [Free] Always Can Drag Hero

      - [Free] Skip Ads

      - [Free] No Attack Cooldown

      - [Free] Global Speed Multiplier (Enable Inside Battle)

       

      Warning


      Do not use on main account. There is a chance of ban. Not responsible for any bans.

       


      🍏 For Non-Jailbroken & No Jailbreak required hacks: https://iosgods.com/forum/79-no-jailbreak-section/
      🤖 Modded Android APK(s): https://iosgods.com/forum/68-android-section/
        • Winner
      • 70 replies
    • Pal Go: Tower Defense TD v0.4.51 [+7 Jailed Cheats]
      Modded/Hacked App: Pal Go: Tower Defense TD By Playwind Ltd
      Bundle ID: com.playwindgames.freedefender
      iTunes Store Link: https://apps.apple.com/us/app/pal-go-tower-defense-td/id6479316663?uo=4


       

      Hack Features

      - [VIP] Freeze Currency (Currency will not decrease when used)

      - [VIP] Currency Always Enough (Buy even when you don't have enough currency)

      - [Free] Higher Recruit Energy (Gives 500 Recruit Energy Every Wave)

      - [Free] Always Can Drag Hero

      - [Free] Skip Ads

      - [Free] No Attack Cooldown

      - [Free] Global Speed Multiplier (Enable Inside Battle)

       

      Warning


      Do not use on main account. There is a chance of ban. Not responsible for any bans.

       

      Jailbreak required iOS hacks: https://iosgods.com/forum/5-game-cheats-hack-requests/
      Modded Android APKs: https://iosgods.com/forum/68-android-section/
      • 94 replies
    • Fortress: Stickman Trenches v3.5 [+2 Jailed Cheats]
      Modded/Hacked App: Fortress: Stickman Trenches By APPWILL COMPANY LTD
      Bundle ID: com.g1.growfortmarines
      App Store Link: https://apps.apple.com/us/app/fortress-stickman-trenches/id6445945405?uo=4



      🤩 Hack Features

      - Enemy Can't Attack
      - Unlimited Currency
      • 2 replies
    • Fortress: Stickman Trenches v3.5 [+2 Cheats]
      Modded/Hacked App: Fortress: Stickman Trenches By APPWILL COMPANY LTD
      Bundle ID: com.g1.growfortmarines
      App Store Link: https://apps.apple.com/us/app/fortress-stickman-trenches/id6445945405?uo=4


      🤩 Hack Features

      - Enemy Can't Attack
      - Unlimited Currency
       
      • 1 reply
    • Zombie Fortress: Trap Defense v0.13.1 [+6 Jailed Cheats]
      Modded/Hacked App: Zombie Fortress: Trap Defense By SayGames LTD
      Bundle ID: com.nlabsoft.zombiecrusher.s
      App Store Link: https://apps.apple.com/us/app/zombie-fortress-trap-defense/id6747713523?uo=4



      🤩 Hack Features

      - Add Cash
      - Add Diamond
      - Add Energy
      - Add Parts
      - Never Die
      - Add Battle Gold (Enable inside battle)
      • 5 replies
    • Zombie Fortress: Trap Defense v0.13.1 [+6 Cheats]
      Modded/Hacked App: Zombie Fortress: Trap Defense By SayGames LTD
      Bundle ID: com.nlabsoft.zombiecrusher.s
      App Store Link: https://apps.apple.com/us/app/zombie-fortress-trap-defense/id6747713523?uo=4



      🤩 Hack Features

      - Add Cash
      - Add Diamond
      - Add Energy
      - Add Parts
      - Never Die
      - Add Battle Gold (Enable inside battle)
      • 2 replies
    • Shadowborn v0.6.1 Debug Menu [+8 Jailed Cheats]
      Modded/Hacked App: Shadowborn By VIVA GAMES S.L.
      Bundle ID: com.onemb.shadowborn
      App Store Link: https://apps.apple.com/us/app/shadowborn/id6738343504?uo=4

       

      🤩 Hack Features

      - Debug Menu
      • 12 replies
    • Shadowborn v0.6.1 Debug Menu [+8 Cheats]
      Modded/Hacked App: Shadowborn By VIVA GAMES S.L.
      Bundle ID: com.onemb.shadowborn
      App Store Link: https://apps.apple.com/us/app/shadowborn/id6738343504?uo=4



      🤩 Hack Features

      - Debug Menu
       
      • 19 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