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

    • Demon RPG v1.12 [ +10 Cheats ] Currency Max
      Modded/Hacked App: Demon RPG By SeHyeon Im
      Bundle ID: com.Owings.DemonRPG
      App Store Link: https://apps.apple.com/us/app/demon-rpg/id1476965737?uo=4

      🤩 Hack Features

      - Unlimited Gems
      - Gold Increaser
      - OFFLINE-REWARD
      - HP Freeze
      Stats / Just Upgrade
      - ATK MAX
      - HP MAX
      - DEF MAX
      - CRITI-ATK
      - DMG-RED
      - HP-REG
      • 0 replies
    • Demon RPG v1.12 [ +10 Jailed ] Currency Max
      Modded/Hacked App: Demon RPG By SeHyeon Im
      Bundle ID: com.Owings.DemonRPG
      App Store Link: https://apps.apple.com/us/app/demon-rpg/id1476965737?uo=4

      🤩 Hack Features

      - Unlimited Gems
      - Gold Increaser
      - OFFLINE-REWARD
      - HP Freeze
      Stats / Just Upgrade
      - ATK MAX
      - HP MAX
      - DEF MAX
      - CRITI-ATK
      - DMG-RED
      - HP-REG
      • 0 replies
    • My Little Goddess : Idle RPG +3 Mods [ Damage & Defence ]
      Mod APK Game Name: My Little Goddess : Idle RPG By Pigames
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.pigames.mylittlegoddess

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      • 0 replies
    • Truck Simulator EVO: Drive USA v2.0 [ +2 Cheats ] Currency Max
      Modded/Hacked App: Truck Simulator EVO: Drive USA By Marusac Alexandru Persoana Fizica Autorizata
      Bundle ID: com.ovilex.truckerzoneamericanroadways
      App Store Link: https://apps.apple.com/us/app/truck-simulator-evo-drive-usa/id6748637350?uo=4

      🤩 Hack Features

      - Unlimited Cash
      - Unlimited Gold
      • 1 reply
    • Truck Simulator EVO: Drive USA v2.0 [ +2 Jailed ] Currency Max
      Modded/Hacked App: Truck Simulator EVO: Drive USA By Marusac Alexandru Persoana Fizica Autorizata
      Bundle ID: com.ovilex.truckerzoneamericanroadways
      App Store Link: https://apps.apple.com/us/app/truck-simulator-evo-drive-usa/id6748637350?uo=4

      🤩 Hack Features

      - Unlimited Cash
      - Unlimited Gold
      • 1 reply
    • Solitaire Truck Deluxe v3.2.1 [ +5 Cheats ] Currency Max
      Modded/Hacked App: Solitaire Truck Deluxe By Beijing Multipoint Unlimited Network Technology Co., Ltd.
      Bundle ID: com.duole.solitaire.zen.home.design.patience.free.card.games
      App Store Link: https://apps.apple.com/us/app/solitaire-truck-deluxe/id6464568524?uo=4

      🤩 Hack Features

      - Auto ADS NO
      - Unlimited Gems
      - Unlimited Wrench
      - Unlimited Undo
      - Unlimited Hints
      • 1 reply
    • Solitaire Truck Deluxe v3.2.1 [ +5 Jailed ] Currency Max
      Modded/Hacked App: Solitaire Truck Deluxe By Beijing Multipoint Unlimited Network Technology Co., Ltd.
      Bundle ID: com.duole.solitaire.zen.home.design.patience.free.card.games
      App Store Link: https://apps.apple.com/us/app/solitaire-truck-deluxe/id6464568524?uo=4
       

      🤩 Hack Features

      - Auto ADS NO
      - Unlimited Gems
      - Unlimited Wrench
      - Unlimited Undo
      - Unlimited Hints
      • 0 replies
    • DRAGON BALL Z DOKKAN BATTLE Japan (ドラゴンボールZ ドッカンバトル) v6.2.5 +7 Cheats!
      Modded/Hacked App: ドラゴンボールZ ドッカンバトル By BANDAI NAMCO Entertainment Inc.
      Bundle ID: jp.co.bandainamcogames.BNGI0211
      iTunes Link: https://itunes.apple.com/jp/app/ドラゴンボールz-ドッカンバトル/id951627670


      Hack Features
      - Unlimited HP  -  (Put .0 at the back of your value: 1000.0)
      - Unlimited Damage  -  (Put .0 at the back of your value: 1000.0)
      - Unlimited Defense  -  (Put .0 at the back of your value: 1000.0)
      - Dice Hack -  [ONLY RANGE BETWEEN 1 - 6 or it will crash]  -  (Put .0 at the back of your value: 4.0)
      - Dice Hack 1, 2, 3
      - Dice Hack 4, 5, 6
      - Auto Win Battles -> Disable if you get errors.
      PUT .0 at the back of all values!
      • 8,082 replies
    • Detective S: Mystery Puzzle v1.21.4 [ +4 APK MOD ] Currency Freeze
      Mod APK Game Name: Detective S: Mystery Puzzle
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.rawhand.dts.gl&hl=en

      🤩 Hack Features

      - Diamond Freeze
      - Gold Freeze
      - Heart Freeze
      - Fragment Freeze
      • 0 replies
    • Detective S: Mystery Game v1.21.3 [ +5 Cheats ] Currency Freeze
      Modded/Hacked App: Detective S: Mystery Game By Rawhand. Inc
      Bundle ID: com.rawhand.dts.ios
      App Store Link: https://apps.apple.com/us/app/detective-s-mystery-game/id1502345814?uo=4

      🤩 Hack Features

      - Diamond Freeze
      - Gold Freeze
      - Heart Freeze
      - Heart Unlimited
      - Fragment Freeze
      • 1 reply
    • Detective S: Mystery Game v1.21.3 [ +5 Jailed ] Currency Freeze
      Modded/Hacked App: Detective S: Mystery Game By Rawhand. Inc
      Bundle ID: com.rawhand.dts.ios
      App Store Link: https://apps.apple.com/us/app/detective-s-mystery-game/id1502345814?uo=4

      🤩 Hack Features

      - Diamond Freeze
      - Gold Freeze
      - Heart Freeze
      - Heart Unlimited
      - Fragment Freeze
      • 0 replies
    • Gale Knights Idle RPG +3 Mods [ Damage + More ]
      Mod APK Game Name: Gale Knights Idle RPG By LightCON Co.,Ltd.
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=net.lightcon.windidle

       

      🤩 Hack Features

      - Damage Multiplier
      - God Mode
      - No Skill Cooldown
      • 2 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