Jump to content

Tweak.xm:53:63: error: expected ';' after return statement


Go to solution Solved by Amuyea,

5 posts in this topic

Recommended Posts

Posted

Hey,

 

When I wanna compile my files to a .deb, I'm getting the error from the title.

Tweak.xm:53:63: error: expected ';' after return statement

Don't really get the prob, I just added a UI Alert from a post from this forum..

 

this is my tweak.xm:

#define PLIST_PATH @"/var/mobile/Library/Preferences/com.ted2.pou.plist"
 
inline bool GetPrefBool(NSString *key) {
return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];
}

%hook Coins
 
-(int)have {
if(GetPrefBool(@"key1")) {
return 987654321;
}
return %orig;
}

-(int)spent {       
if(GetPrefBool(@"key2")) {
return 0;
}
return %orig;
}

-(int)cheated {
if(GetPrefBool(@"key1")) {
return 0;
}
return %orig;
}

%end

%hook State

-(int)setLevel {
if(GetPrefBool(@"key4")) {
return 270;
}
return %orig;
}

-(void)setHungry:(bool)argument {
if(GetPrefBool(@"key3")) {
argument = false;
}
return %orig
}

%end


%hook AppDelegate

-(void)applicationDidBecomeActive:(id)arg { 

UIAlertView *credits = [[UIAlertView alloc] initWithTitle:@"Pou Cheat." 
                                                  message:@"Made by Ted2 from iOSGods" 
                                                 delegate:self
                                        cancelButtonTitle:@"Close Test Pop-Up" 
                                        otherButtonTitles:@"Visit us!", nil]; 
[credits show];
[credits release]; 
%orig();
}
 
%new
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
 
NSString *button = [alertView buttonTitleAtIndex:buttonIndex];
 
        if([button isEqualToString:@"Visis the iOSGods Family!"])
        {
                [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.iosgods.com"]];                                                                               
        }
}

%end 

Anyone knows what's wrong with the code?

 

PS: yes, pou can be hacked using flex, but practice makes you better right? :p

Posted

Speak English i dont undestand H@ck3r language. :)

If this is 'H@ck3r' language, then I don't wanna know what others speak... lol

  • Solution
Posted (edited)


#define PLIST_PATH @"/var/mobile/Library/Preferences/com.ted2.pou.plist"

 

inline bool GetPrefBool(NSString *key) {

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

}

 

%hook Coins

 

-(int)have {

if(GetPrefBool(@"key1")) {

return 987654321;

}

return %orig;

}

 

-(int)spent {

if(GetPrefBool(@"key2")) {

return 0;

}

return %orig;

}

 

-(int)cheated {

if(GetPrefBool(@"key3")) { // you had key1 so you put key1 again so it should be key3

return 0;

}

return %orig;

}

 

%end

 

%hook State

 

-(int)setLevel {

if(GetPrefBool(@"key4")) {

return 270;

}

return %orig;

}

 

-(void)setHungry:(bool)argument {

if(GetPrefBool(@"key5")) { // you had key3 so you put key3 again so it should be key5

argument = false;

}

return %orig; // you forgot ; here

}

 

%end

 

 

%hook AppDelegate

 

-(void)applicationDidBecomeActive:(id)arg {

 

UIAlertView *credits = [[UIAlertView alloc] initWithTitle:@"Pou Cheat."

message:@"Made by Ted2 from iOSGods"

delegate:self

cancelButtonTitle:@"Close Test Pop-Up"

otherButtonTitles:@"Visit us!", nil];

[credits show];

[credits release];

%orig();

}

 

%new

-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {

 

NSString *button = [alertView buttonTitleAtIndex:buttonIndex];

 

if([button isEqualToString:@"Visis the iOSGods Family!"])

{

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.iosgods.com"]];

}

}

 

%end

 

Updated by Amuyea
Posted
#define PLIST_PATH @"/var/mobile/Library/Preferences/com.ted2.pou.plist"

inline bool GetPrefBool(NSString *key) {
return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];
}

%hook Coins

-(int)have {
if(GetPrefBool(@"key1")) {
return 987654321;
}
return %orig;
}

-(int)spent { 
if(GetPrefBool(@"key2")) {
return 0;
}
return %orig;
}

-(int)cheated {
if(GetPrefBool(@"key3")) {  // you had key1 so you put key1 again so it should be key3
return 0;
}
return %orig;
}

%end

%hook State

-(int)setLevel {
if(GetPrefBool(@"key4")) {
return 270;
}
return %orig;
}

-(void)setHungry:(bool)argument {
if(GetPrefBool(@"key5")) { // you had key3 so you put key3 again so it should be key5
argument = false;
}
return %orig; // you forgot ; here
}

%end


%hook AppDelegate

-(void)applicationDidBecomeActive:(id)arg { 

UIAlertView *credits = [[UIAlertView alloc] initWithTitle:@"Pou Cheat."
message:@"Made by Ted2 from iOSGods" 
delegate:self
cancelButtonTitle:@"Close Test Pop-Up"
otherButtonTitles:@"Visit us!", nil]; 
[credits show];
[credits release]; 
%orig();
}

%new
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {

NSString *button = [alertView buttonTitleAtIndex:buttonIndex];

if([button isEqualToString:@"Visis the iOSGods Family!"])
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.iosgods.com"]]; 
}
}

%end 

Thanks, worked!

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

    • Heroes Crew: Strategy Defense v1.1.5 [+6 Cheats]
      Modded/Hacked App: Heroes Crew: Strategy Defense By AlohaFactory
      Bundle ID: com.overdogs.heroes
      App Store Link: https://apps.apple.com/us/app/heroes-crew-strategy-defense/id6744350078?uo=4



      🤩 Hack Features

      - Add Currency
      - Unlimited Items
      - Unlimited Property (Heroes, Relic etc)
      - Activate VVip (Use after tutorial and only in main menu)
      - Activate Premium Hunt Pass (Use after tutorial and only in main menu)
      - Unlimited Battle Currency (Always Will Increase)
      • 31 replies
    • Heroes Crew: Strategy Defense v1.1.5 [+6 Jailed Cheats]
      Modded/Hacked App: Heroes Crew: Strategy Defense By AlohaFactory
      Bundle ID: com.overdogs.heroes
      App Store Link: https://apps.apple.com/us/app/heroes-crew-strategy-defense/id6744350078?uo=4



      🤩 Hack Features

      - Add Currency
      - Unlimited Items
      - Unlimited Property (Heroes, Relic etc)
      - Activate VVip (Use after tutorial and only in main menu)
      - Activate Premium Hunt Pass (Use after tutorial and only in main menu)
      - Unlimited Battle Currency (Always Will Increase)
      • 15 replies
    • Candy Pop Story : Match 3 v1.23.0722 [ +3 Cheats ] Auto Win
      Modded/Hacked App: Candy Pop Story : Match 3 By F.O.G LIMITED
      Bundle ID: com.gamoper.candysweetstory.ios
      App Store Link: https://apps.apple.com/us/app/candy-pop-story-match-3/id6670773988?uo=4


      🤩 Hack Features

      - Auto Win
      - Coins
      - Moves
      -
      • 6 replies
    • Candy Pop Story : Match 3 v1.23.0722 [ +3 Jailed ] Auto Win
      Modded/Hacked App: Candy Pop Story : Match 3 By F.O.G LIMITED
      Bundle ID: com.gamoper.candysweetstory.ios
      App Store Link: https://apps.apple.com/us/app/candy-pop-story-match-3/id6670773988?uo=4
       

      🤩 Hack Features

      - Auto Win
      - Coins
      - Moves
      • 6 replies
    • Boom Castle Tower Defense TD v1.5.2 [ +7 Jailed ] Easy Win
      Modded/Hacked App: Boom Castle: Tower Defense TD By Terahype s.r.o.
      Bundle ID: castle.heroes.tower.defense.kingdom.magic.battle.archer
      iTunes Store Link: https://apps.apple.com/us/app/boom-castle-tower-defense-td/id6502820312?uo=4


      Hack Features:

      - Enemy Status [ HP DEF ]

      - Base HP 

      - Battle Cost 0 

      - Stage Unlocked [ Play Any Stage ]

      - Battle Pass Unlocked 

      - Battle Pass Claim Unlimited [ Gems Gold ]

      - iGG Speed Hack Max 0 - 10 [ Skill CD - ATK Speed - Animation Speed - Wave Faster ]


      Jailbreak required hack(s): https://iosgods.com/forum/5-game-cheats-hack-requests/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 48 replies
    • Boom Castle Tower Defense TD v1.5.2 [ +7 Cheats ] Easy Win
      Modded/Hacked App: Boom Castle: Tower Defense TD By Terahype s.r.o.
      Bundle ID: castle.heroes.tower.defense.kingdom.magic.battle.archer
      iTunes Store Link: https://apps.apple.com/us/app/boom-castle-tower-defense-td/id6502820312?uo=4


      Hack Features:
      - Enemy Status [ HP DEF ]

      - Base HP 

      - Battle Cost 0 

      -  Stage Unlocked [ Play Any Stage ]

      - Battle Pass Unlocked 

      - Battle Pass Claim Unlimited [ Gems Gold ]

      - iGG Speed Hack Max 0 - 10 [ Skill CD - ATK Speed - Animation Speed - Wave Faster ] 


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 52 replies
    • Zombie Infinity v1.9.1 [ +5 Cheats ] Currency Max
      Modded/Hacked App: Zombie Infinity By kamasu.jp Inc.
      Bundle ID: jp.kamasu.oread
      App Store Link: https://apps.apple.com/ph/app/zombie-infinity/id6736433765?uo=4


      🤩 Hack Features

      - ADS Pass

      - Energy Pass

      - Premium Pass

      - Currency

      - Hero Status [ HP - DMG ]
      • 4 replies
    • Zombie Infinity v1.9.1 [ +5 Jailed ] Currency Max
      Modded/Hacked App: Zombie Infinity By kamasu.jp Inc.
      Bundle ID: jp.kamasu.oread
      App Store Link: https://apps.apple.com/ph/app/zombie-infinity/id6736433765?uo=4


      🤩 Hack Features

      - ADS Pass

      - Energy Pass

      - Premium Pass

      - Currency

      - Hero Status [ HP - DMG ]
      • 3 replies
    • Alien Survivor: Survival Arena v1.40.0 [ +7 Cheats ] Currency Max
      Modded/Hacked App: Alien Survivor: Survival Arena By IMPONILOX LIMITED
      Bundle ID: world.playme.x
      iTunes Store Link: https://apps.apple.com/us/app/alien-survivor-survival-arena/id1669761844?uo=4
       

      🚀 Hack Features

      - ADS NO [ Rewards Free ]

      - Gems [ Achievements Rewards Only One Get ]

      - Energy [ Just Buy ]

      - HP [ Just Equip & Unequip ]

      - ATK [ Just Equip & Unequip ]

      - DEF [ Just Equip & Unequip ]

      - Skill CD [ First Get Then Use ]


      🍏 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/
      • 19 replies
    • Alien Survivor: Survival Arena v1.40.0 [ +7 Jailed ] Currency Max
      Modded/Hacked App: Alien Survivor: Survival Arena By IMPONILOX LIMITED
      Bundle ID: world.playme.x
      iTunes Store Link: https://apps.apple.com/us/app/alien-survivor-survival-arena/id1669761844?uo=4


      🚀 Hack Features

      - ADS NO [ Rewards Free ]

      - Gems [ Achievements Rewards Only One Get ]

      - Energy [ Just Buy ]

      - HP [ Just Equip & Unequip ]

      - ATK [ Just Equip & Unequip ]

      - DEF [ Just Equip & Unequip ]

      - Skill CD [ First Get Then Use ]


      🍏 Jailbreak iOS hacks: https://iosgods.com/forum/5-game-cheats-hack-requests/
      🤖 Modded Android APKs: https://iosgods.com/forum/68-android-section/
        • Like
      • 32 replies
    • Merge Cruise: Mystery Puzzle v0.36.380 [ +2 Cheats ] Currency Max
      Modded/Hacked App: Merge Cruise: Mystery Puzzle By STUDIO PEERPLAY GAMES LTD
      Bundle ID: com.peerplay.megamerge
      iTunes Store Link: https://apps.apple.com/us/app/merge-cruise-mystery-puzzle/id6459056553?uo=4
       

      🤩 Hack Features

      - Cash
      - Energy

      • 16 replies
    • Merge Cruise: Mystery Puzzle v0.36.380 [ +2 Jailed ] Currency Max
      Modded/Hacked App: Merge Cruise: Mystery Puzzle By STUDIO PEERPLAY GAMES LTD
      Bundle ID: com.peerplay.megamerge
      iTunes Store Link: https://apps.apple.com/us/app/merge-cruise-mystery-puzzle/id6459056553?uo=4
       

      🤩 Hack Features

      - Cash
      - Energy

      • 20 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