Jump to content

theos error - something wrong with my code


Go to solution Solved by castix,

6 posts in this topic

Recommended Posts

Posted

%hook UFCIAPAccessControl


 


-(bool) isFightPassSubActive {


return TRUE;


}


-(bool) isPPVValid:(id)fp4 {


return TRUE;


fp4= nil;


%orig();


}


 


-(void) accountAddPackageWithItemId:(id)fp5 receipt:(id)fp6 autorenewable:(bool)fp7 isPPV:(bool) {


fp5= nil;


fp6= nil;


fp7= TRUE;


%orig(fp5,fp6,fp7);


}


 


%end


 


%hook UFCGeoManager


 


-(bool) getLocationAvailable {


return TRUE;


}


 


%end


 


When trying to create a theos tweak I am getting the following error:


 


Preprocessing Tweak.xm...


 Compiling Tweak.xm...


Tweak.xm:31:178: error: expected class member or base class name


  ...self, SEL _cmd, id fp5, id fp6, bool fp7):(bool) {


                                               ^


Tweak.xm:31:178: error: expected '{' or ','


Tweak.xm:31:177: error: only constructors take base initializers


  ...self, SEL _cmd, id fp5, id fp6, bool fp7):(bool) {


 


Posted

And that is from my hack xD I leech it thx

 

 

But really, it looked f**ked up.

 

 

 

-(void) accountAddPackageWithItemId:(id)fp5 receipt:(id)fp6 autorenewable:(bool)fp7 isPPV:(bool)fp7 {
Posted

 

And that is from my hack xD I leech it thx

 

 

But really, it looked f**ked up.

-(void) accountAddPackageWithItemId:(id)fp5 receipt:(id)fp6 autorenewable:(bool)fp7 isPPV:(bool)fp7 {

I tried to convert the flex patch I found online to create a tweak. I am glad, @castix spotted the mistake and provided me with the solution !

  • Solution
Posted

Here is the said solution for future reference

 

 


Change

-(bool) isPPVValid:(id)fp4 {
return TRUE;
fp4= nil;
%orig();
}

to 

-(bool) isPPVValid:(id)fp4 {
fp4 = nil;
return TRUE;
}

and 

-(void) accountAddPackageWithItemId:(id)fp5 receipt:(id)fp6 autorenewable:(bool)fp7 isPPV:(bool) {
fp5= nil;
fp6= nil;
fp7= TRUE;
%orig(fp5,fp6,fp7);
}

to

-(void) accountAddPackageWithItemId:(id)fp5 receipt:(id)fp6 autorenewable:(bool)fp7 isPPV:(bool)fp8 {
fp5= nil;
fp6= nil;
fp7= TRUE;
%orig(fp5, fp6, fp7, fp8);
}

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