Jump to content

Compiling error MS


Go to solution Solved by Rook,

48 posts in this topic

Recommended Posts

Posted

Bundle ID is correct, but the bool doesn't work, when i select it need to be to 'true' but it doesn't do anything ? :/

Show us your tweak.xm so we can help.

Posted

Alright,

________________

 

 

#define PLIST_PATH @"/var/mobile/Library/Preferences/prefbundle.plist"
inline bool GetPrefBool(NSString *key)
{
return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];
}
 
%hook ShopViewController
-(bool) UseDailyBike {
if(GetPrefBool(@"kDailyBike")) {
    return true;
}
return %orig;
}
%end
 
%hook ShopViewController
-(bool) UseUSABike {
if(GetPrefBool(@"kUsaBike")) {
    return true;
}
return %orig;
}
%end
 
%hook ShopViewController
-(bool) UseUKBike {
if(GetPrefBool(@"kEnglandBike")) {
    return true;
}
return %orig;
}
%end
 
%hook ShopViewController
-(bool) UseAustraliaBike {
if(GetPrefBool(@"kAustraliaBike")) {
    return true;
}
return %orig;
}
%end
 
%hook ShopViewController
-(bool) UseNetherlandsBike {
if(GetPrefBool(@"kNetherlandsBike")) {
    return true;
}
return %orig;
}
%end
 
%hook ShopViewController
-(bool) UseFranceBike {
if(GetPrefBool(@"kFranceBike")) {
    return true;
}
return %orig;
}
%end
 
%hook ShopViewController
-(bool) UseGermanyBike {
if(GetPrefBool(@"kGermanyBike")) {
    return true;
}
return %orig;
}
%end
 
%hook ShopViewController
-(bool) UseBrazilBike {
if(GetPrefBool(@"kBrazilBike")) {
    return true;
}
return %orig;
}
%end
 
%hook ShopViewController
-(bool) UseSpainBike {
if(GetPrefBool(@"kSpainBike")) {
    return true;
}
return %orig;
}
%end
 
%hook ShopViewController
-(bool) UseJapanBike {
if(GetPrefBool(@"kJapanBike")) {
    return true;
}
return %orig;
}
%end
 
%hook ShopViewController
-(bool) UseBelgiumBike {
if(GetPrefBool(@"kBelgiumBike")) {
    return true;
}
return %orig;
}
%end
 
%hook ShopViewController
-(bool) UseItalyBike {
if(GetPrefBool(@"kItalyBike")) {
    return true;
}
return %orig;
}
%end
 
 
%hook ShopViewController
-(bool) UseArgentiniaBike {
if(GetPrefBool(@"kArgentiniaBike")) {
    return true;
}
return %orig;
}
%end
 
%hook ShopViewController
-(bool) UseMexicoBike {
if(GetPrefBool(@"kMexicoBike")) {
    return true;
}
return %orig;
}
%end
 
 
%hook ShopViewController
-(bool) UseSuperPenguin {
if(GetPrefBool(@"kSuperBike")) {
    return true;
}
return %orig;
}
%end
 
 
%hook ShopViewController
-(bool) UsePenguinGirl {
if(GetPrefBool(@"kNormalBike")) {
    return true;
}
return %orig;
}
%end
 
 
%hook ShopViewController
-(bool) UseKidsMode {
if(GetPrefBool(@"kKidsBike")) {
    return true;
}
return %orig;
}
%end
 
 
%hook ShopViewController
-(bool) UseMagicPenguin {
if(GetPrefBool(@"kGhostBike")) {
    return true;
}
return %orig;
}
%end
 
%hook ShopViewController
-(bool) UseUltraBike {
if(GetPrefBool(@"kUltraBike")) {
    return true;
}
return %orig;
}
%end
 
%hook ShopViewController
-(bool) UseThanksgivingBike {
if(GetPrefBool(@"kThanlsgivingBike")) {
    return true;
}
return %orig;
}
%end
 
 
%hook ShopViewController
-(bool) UseXmasBike {
if(GetPrefBool(@"kSantaBike")) {
    return true;
}
return %orig;
}
%end
 
%hook ShopViewController
-(bool) UseEasterBike {
if(GetPrefBool(@"kEasterBike")) {
    return true;
}
return %orig;
}
%end
 
 
%hook ShopViewController
-(bool) UseNinjaBike {
if(GetPrefBool(@"kNinjaBike")) {
    return true;
}
return %orig;
}
%end
 
%hook ShopViewController
-(bool) UseCopBike {
if(GetPrefBool(@"kPoliceBike")) {
    return true;
}
return %orig;
}
%end
 
%hook ShopViewController
-(bool) UseRetroBike {
if(GetPrefBool(@"kRetroBike")) {
    return true;
}
return %orig;
}
%end
 
%hook ShopViewController
-(bool) UseZombieBike {
if(GetPrefBool(@"kZombie")) {
    return true;
}
return %orig;
}
%end
 
%hook ShopViewController
-(bool) UseConstructorBike {
if(GetPrefBool(@"kArmyBike")) {
    return true;
}
return %orig;
}
%end
 
%hook ShopViewController
-(bool) UseHalloweenBike {
if(GetPrefBool(@"kHalloweenBike")) {
    return true;
}
return %orig;
}
%end
 
%hook ShopViewController
-(bool) UseEasyBike {
if(GetPrefBool(@"kGirlBike")) {
    return true;
}
return %orig;
}
%end
 
%hook ShopViewController
-(bool) UseBronzeBike {
if(GetPrefBool(@"kBronzeBike")) {
    return true;
}
return %orig;
}
%end
 
%hook ShopViewController
-(bool) UseSilverBike {
if(GetPrefBool(@"kSilverBike")) {
    return true;
}
return %orig;
}
%end
 
%hook ShopViewController
-(bool) UseGoldBike {
if(GetPrefBool(@"kGoldBike")) {
    return true;
}
return %orig;
}
%end
 
%hook ShopViewController
-(bool) UseAcrobaticBike {
if(GetPrefBool(@"kAcrobaticBike")) {
    return true;
}
return %orig;
}
%end
 
%hook ShopViewController
-(bool) UseBeatBike {
if(GetPrefBool(@"kHogBike")) {
    return true
}
return %orig;
}
%end
 
%hook ShopViewController
-(bool) UseSpamBike {
if(GetPrefBool(@"kHighTechBike")) {
    return true;
}
return %orig;
}
 
%end

Show us your tweak.xm so we can help.

There it is, a bit long.

Posted

Ouch!

 

It could have been coded better. Did you make a key for each bike?

Posted

Ouch!

 

It could have been coded better. Did you make a key for each bike?

Haha, my bad just started coding ;)

 

And with key do you mean in the 'prefbundle.plist' ?

 

I have for example this for each bike:

'<key>cell</key>

<string>PSSwitchCell</string>
<key>default</key>
<false/>
<key>defaults</key>
<string>prefbundle</string>
<key>key</key>
<string>kDailyBike</string>
<key>label</key>
<string>Daily Bike</string> '
Posted

 

Haha, my bad just started coding ;)

 

And with key do you mean in the 'prefbundle.plist' ?

 

I have for example this for each bike:

'<key>cell</key>

<string>PSSwitchCell</string>
<key>default</key>
<false/>
<key>defaults</key>
<string>prefbundle</string>
<key>key</key>
<string>kDailyBike</string>
<key>label</key>
<string>Daily Bike</string> '

 

Do they have their own keys though?

 

Like kUsaBike, kAnotherBike etc?

Posted

What do you mean ?

It has no connection to the tweak.xm. The keys aren't there. It's the default one used in the topic.

Posted

It has no connection to the tweak.xm. The keys aren't there. It's the default one used in the topic.

Confused now :/

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