Jump to content

I'm getting error messages while trying to compile patches


Go to solution Solved by Johnkittz,

21 posts in this topic

Recommended Posts

Posted

I'm getting this error while trying to compile tweaks in terminal 

 

 

Tweak.xm:17:75: error: expected class member or base class name
...self, SEL _cmd):(int) {
^
Tweak.xm:17:75: error: expected '{' or ','
Tweak.xm:17:74: error: only constructors take base initializers
...self, SEL _cmd):(int) {
^
Tweak.xm:18:1: error: void function
'_logos_method$_ungrouped$User$setPoints' should not return a
value [-Wreturn-type]
return 999;
^ ~~~
Tweak.xm:29:1: error: void function
'_logos_method$_ungrouped$AdController$setShowCoinAds' should not return a value [-Wreturn-type]
return false;
^ ~~~~~
5 errors generated.
make[2]: *** [obj/Tweak.xm.23543844.o] Error 1
make[1]: *** [internal-library-all_] Error 2
make: *** [unlimitedInstaPoints.all.tweak.variables] Error 2

 

 

and here is the code/edit I did. I don't think there's any mistake here

 

 %hook SPJailbreakStatusProvider

+ (BOOL) isJailbroken {
return false;
}
%end
%hook RevMobDeviceInfo
- (BOOL) isJailbroken {
return false;
}
%end
%hook ADCConfiguration
- (BOOL) areAdsDisabled {
return true;
}
%end
%hook User
- (void)setPoints:(int) {
return 999;
}
- (int)points {
return 999;
}
%end
%hook AdController
- (BOOL)showCoinAds {
return false;
}
- (void)setShowCoinAds {
return false;
}
%end
 
 
Posted

 

 %hook SPJailbreakStatusProvider

+ (BOOL) isJailbroken {

return false;

}

%end

%hook RevMobDeviceInfo

- (BOOL) isJailbroken {

return false;

}

%end

%hook ADCConfiguration

- (BOOL) areAdsDisabled {

return true;

}

%end

%hook User

- (void)setPoints:(int)fp6 {

return 999;

}

- (int)points {

return 999;

}

%end

%hook AdController

- (BOOL)showCoinAds {

return false;

}

- (void)setShowCoinAds:(BOOL)fp8 {

return false;

}

%end

Try That ^^^^

You cannot return voids, you can only null them.

 

If it's a void with an argument then follow this: https://iosgods.com/topic/831-tutorial-how-to-hack-using-mobile-substrate-method-hooking/

he was returning a void with a agrument but without the arg and idenfier i fixed the code :)

Posted

You cannot return voids, you can only null them.

 

If it's a void with an argument then follow this: https://iosgods.com/topic/831-tutorial-how-to-hack-using-mobile-substrate-method-hooking/

 

 

Try That ^^^^

he was returning a void with a agrument but without the arg and idenfier i fixed the code :)

 

 

Thanks guys. Before i was getting 5 errors but now it's 2 errors . So how I'm I going to get rid of this two now :)

 

 

...

Tweak.xm:19:1: error: void function

'_logos_method$_ungrouped$User$setPoints should not return a

value [-Wreturn-type]

return 999;

^ ~~~

Tweak.xm:30:1: error: void function

'_logos_method$_ungrouped$AdController$setShowCoinAds should

not return a value [-Wreturn-type]

return false;

^ ~~~~~

2 errors generated.

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

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

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

Posted

Thanks guys. Before i was getting 5 errors but now it's 2 errors . So how I'm I going to get rid of this two now :)

 

 

...

Tweak.xm:19:1: error: void function

'_logos_method$_ungrouped$User$setPoints should not return a

value [-Wreturn-type]

return 999;

^ ~~~

Tweak.xm:30:1: error: void function

'_logos_method$_ungrouped$AdController$setShowCoinAds should

not return a value [-Wreturn-type]

return false;

^ ~~~~~

2 errors generated.

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

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

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

 

 %hook SPJailbreakStatusProvider

+(BOOL) isJailbroken {

return false;

}

%end

%hook RevMobDeviceInfo

- (BOOL) isJailbroken {

return false;

}

%end

%hook ADCConfiguration

- (BOOL) areAdsDisabled {

return true;

}

%end

%hook User

- (void)setPoints:(int)fp6 {

fp6 = 999;

}

- (int)points {

return 999;

}

%end

%hook AdController

- (BOOL)showCoinAds {

return false;

}

- (void)setShowCoinAds:(BOOL)fp8 {

fp8 = false;

}

%end

try that

  • Solution
Posted

 

 %hook SPJailbreakStatusProvider

+(BOOL) isJailbroken {

return false;

}

%end

%hook RevMobDeviceInfo

- (BOOL) isJailbroken {

return false;

}

%end

%hook ADCConfiguration

- (BOOL) areAdsDisabled {

return true;

}

%end

%hook User

- (void)setPoints:(int)fp6 {

%orig(999);

}

- (int)points {

return 999;

}

%end

%hook AdController

- (BOOL)showCoinAds {

return false;

}

- (void)setShowCoinAds:(BOOL)fp8 {

%orig(FALSE);

}

%end

Another thing to try :)

Posted

Another thing to try :)

 

It gave me this

 

 

clang: error: unable to execute command: Bus error: 10

clang: error: linker command failed due to signal (use -v to see invocation)

make[2]: *** [obj/UnlimitedInstaPoints.dylib.64873355.unsigned] Error 254

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

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

Posted

It gave me this

 

 

clang: error: unable to execute command: Bus error: 10

clang: error: linker command failed due to signal (use -v to see invocation)

make[2]: *** [obj/UnlimitedInstaPoints.dylib.64873355.unsigned] Error 254

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

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

you need to sign stuff now here's a tut: https://iosgods.com/topic/18581-how-to-get-theos-working-on-ios-9-32-bit-only/

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