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

    • ZakuzakuSlash +5 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: ZakuzakuSlash By nekosuko
      Bundle ID: jp.nekosuko.zakuzakuslash
      App Store Link: https://apps.apple.com/us/app/zakuzakuslash/id6749934570?uo=4

       


      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - XP Multiplier
      - Unlimited Gold -> Will increase instead of decrease.
        • Winner
      • 1 reply
    • Piggy Land 3D v1.2.2 [ +4 Jailed ] Currency Max
      Modded/Hacked App: Piggy Land 3D By PIXON PTE. LTD.
      Bundle ID: farm.piggy.animal.jam.away
      App Store Link: https://apps.apple.com/us/app/piggy-land-3d/id6762121301?uo=4

      🤩 Hack Features

      - Auto ADS No
      - Unlimited Coin
      - Unlimited Booster
      - Custom Level
        • Like
      • 1 reply
    • Piggy Land 3D v1.2.2 [ +4 Cheats ] Currency Max
      Modded/Hacked App: Piggy Land 3D By PIXON PTE. LTD.
      Bundle ID: farm.piggy.animal.jam.away
      App Store Link: https://apps.apple.com/us/app/piggy-land-3d/id6762121301?uo=4

      🤩 Hack Features

      - Auto ADS No
      - Unlimited Coin
      - Unlimited Booster
      - Custom Level
      • 0 replies
    • Dwarfs Diggers: Idle Master v0.7.4 [ +4 Jailed ] Currency Freeze
      Modded/Hacked App: Dwarfs Diggers: Idle Master By BLACK BOX DIGITAL LLP
      Bundle ID: com.bbdigital.idle.dwarfs.master
      App Store Link: https://apps.apple.com/us/app/dwarfs-diggers-idle-master/id6769121279?uo=4

      🤩 Hack Features

      - Currency Freeze
      - Resources Freeze
      - Energy Freeze
      - Troop Drop Unlimited
        • Like
      • 2 replies
    • Dwarfs Diggers: Idle Master v0.7.4 [ +4 Cheats ] Currency Freeze
      Modded/Hacked App: Dwarfs Diggers: Idle Master By BLACK BOX DIGITAL LLP
      Bundle ID: com.bbdigital.idle.dwarfs.master
      App Store Link: https://apps.apple.com/us/app/dwarfs-diggers-idle-master/id6769121279?uo=4

      🤩 Hack Features

      - Currency Freeze
      - Resources Freeze
      - Energy Freeze
      - Troop Drop Unlimited
        • Like
      • 1 reply
    • Metal Slug Rush v1.0.0 [ +9 APK MOD ] Currency Max
      Mod APK Game Name: Metal Slug Rush
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.ringgames.msm

      🤩 Hack Features

      - Unlimited Gold
      - Unlimited Gems
      - Unlimited Energy
      - Unlimited Silver keys
      - Unlimited Golden Keys
      - Unlimited Special Keys
      - Unlimited Blueprint
      - Unlimited Token
      - Unlimited Ticket +3
        • Agree
        • Like
      • 1 reply
    • Metal Slug Rush v1.0.0 [ +9 Cheats ] Currency Max
      Modded/Hacked App: Metal Slug Rush By REVIVECONTENTS CO.,LTD.
      Bundle ID: com.ringgames.msm
      App Store Link: https://apps.apple.com/us/app/metal-slug-rush/id6775727338?uo=4

      🤩 Hack Features

      - Unlimited Gold
      - Unlimited Gems
      - Unlimited Energy
      - Unlimited Silver keys
      - Unlimited Golden Keys
      - Unlimited Special Keys
      - Unlimited Blueprint
      - Unlimited Token
      - Unlimited Ticket +3
        • Thanks
        • Like
      • 3 replies
    • Metal Slug Rush v1.0.0 [ +9 jailed ] Currency Max
      Modded/Hacked App: Metal Slug Rush By REVIVECONTENTS CO.,LTD.
      Bundle ID: com.ringgames.msm
      App Store Link: https://apps.apple.com/us/app/metal-slug-rush/id6775727338?uo=4

      🤩 Hack Features

      - Unlimited Gold
      - Unlimited Gems
      - Unlimited Energy
      - Unlimited Silver keys
      - Unlimited Golden Keys
      - Unlimited Special Keys
      - Unlimited Blueprint
      - Unlimited Token
      - Unlimited Ticket +3
        • Agree
        • Like
      • 3 replies
    • Pixel Mage: Idle RPG +10 Mods [ Unlimited Currencies ]
      Mod APK Game Name: Pixel Mage: Idle RPG By StreetComplete
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.streetcomplete.pixelmagician

       

      🤩 Hack Features

      - Damage Multiplier
      - Attack/Move Speed Multiplier
      - Freeze Gold
      - Unlimited Gold -> Will increase instead of decrease.
      - Freeze Blue Diamonds
      - Unlimited Blue Diamonds -> Will increase instead of decrease.
      - Freeze Red Diamonds
      - Unlimited Red Diamonds -> Will increase instead of decrease.
      - Freeze Purple Diamonds
      - Unlimited Purple Diamonds -> Will increase instead of decrease.
        • Thanks
        • Like
      • 0 replies
    • Pixel Mage: Idle RPG +10 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Pixel Mage: Idle RPG By YONGJIN JO
      Bundle ID: com.streetcomplete.pixelmagician
      App Store Link: https://apps.apple.com/us/app/pixel-mage-idle-rpg/id6741889270?uo=4

       


      🤩 Hack Features

      - Damage Multiplier
      - Attack/Move Speed Multiplier
      - Freeze Gold
      - Unlimited Gold -> Will increase instead of decrease.
      - Freeze Blue Diamonds
      - Unlimited Blue Diamonds -> Will increase instead of decrease.
      - Freeze Red Diamonds
      - Unlimited Red Diamonds -> Will increase instead of decrease.
      - Freeze Purple Diamonds
      - Unlimited Purple Diamonds -> Will increase instead of decrease.
        • Agree
        • Winner
        • Like
      • 10 replies
    • Toy Brawlers: Arena Fight +3 Mods [ Damage & Defence ]
      Mod APK Game Name: Toy Brawlers: Arena Fight By Studıo Gamebıt Yazılım Ve Teknoloji Ltd. Şti.
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.studiogamebit.toybrawlers

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
        • Winner
      • 0 replies
    • Bullet Boy v41 [ +1 Cheats ] Gems Max
      Modded/Hacked App: Bullet Boy By Outbox SRL
      Bundle ID: com.pomelogames.BulletBoy
      App Store Link: https://apps.apple.com/us/app/bullet-boy/id899606169?uo=4

      🤩 Hack Features

      - Gems Max
        • Like
      • 0 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