Jump to content

Tweak.xm error?


Go to solution Solved by Goggwell,

4 posts in this topic

Recommended Posts

Posted

Hello, im making a patcher. When i compile my patcher i get this error:

 

theos/bin/lib/aliased.pm line 42.

logos: warnings being treated as errors

Tweak.xm:60: warning: missing %end (%hook opened at Tweak.xm:36 extends to EOF)

make[2]: *** [obj/Tweak.xm.dbc43aba.o] Error 1

make[1]: *** [internal-library-all_] Error 2

make: *** [happywheels.all.tweak.variables] Error 2

Iphone:/var/mobile/happywheels root#

 

Here's my tweak.xm:

 

#define PLIST_PATH @"/var/mobile/Library/Preferences/com.iosgods.happywheels.plist"

 

inline bool GetPrefBool(NSString *key) {

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

}

 

%hook Session

 

-(float)gravity {

if(GetPrefBool(@"key1")) {

return -5.00f;

}

return %orig;

}

 

%end

 

%hook CharacterB2D

 

-(void)addNeckWoundToChest {

if(GetPrefBool(@"key2")) {

}

return %orig;

}

 

%end

 

 

/* Popup with a link

 

Varieties of a UIAlertView Popup can be found here: http://iosgods.com/topic/13988-varieties-of-uialertview-types-to-use-in-your-tweaks-patchers/

 

*/

 

 

%hook AppDelegate // Change this with your Application's Delegate. AppController, UnityAppController, GameDelegate etc.

 

- (BOOL)application:(id)fp8 didFinishLaunchingWithOptions:(id)fp12 { // Popup only once at each launch of the app.

UIAlertView *igcredits = [[uIAlertView alloc] initWithTitle:@"happywheels Cheats"

message:@"\nhappywheels Cheats by axce for iOSGods.com"

delegate:self

cancelButtonTitle:@"Thanks"

otherButtonTitles:@"Visit Us", nil];

[igcredits show];

[igcredits release];

return %orig();

}

 

%new

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

 

NSString *button = [alertView buttonTitleAtIndex:buttonIndex];

 

if([button isEqualToString:@"Visit Us"])

{

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

}

}

%vgvvvggtend

 

Where is the problem? Please help.

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