Jump to content

THEOS compiling Error


Go to solution Solved by Rook,

7 posts in this topic

Recommended Posts

Posted

So im trying to compile a hack that ive spent hours on putting together but  i keep getting this error

...GameData; @class EnemyModifierShield; @class GameBackPack; @class Level...
                                                                ^
/home/john/kingdomrush/theos/include/QuartzCore/QuartzCore-Structs.h:114:22: note:
      previous definition is here
typedef struct Level Level;
                     ^
1 error generated.
/home/john/kingdomrush/theos/makefiles/instance/rules.mk:144: recipe for target 'obj/Tweak.xm.ca30eef4.o' failed
make[2]: *** [obj/Tweak.xm.ca30eef4.o] Error 1
/home/john/kingdomrush/theos/makefiles/instance/library.mk:19: recipe for target 'internal-library-all_' failed
make[1]: *** [internal-library-all_] Error 2
/home/john/kingdomrush/theos/makefiles/master/rules.mk:54: recipe for target 'KingdomRush.all.tweak.variables' failed

anybody? also i did not hook a class twice

Posted

Send me your tweak.xm

Tweak.xm

#define PLIST_PATH @"/var/mobile/Library/Preferences/com.johnkittz.kingdomrush.plist"
 
inline bool GetPrefBool(NSString *key) {
return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];
}

%hook GameBackPack
 
-(int)currentGems {
if(GetPrefBool(@"kgem")) {
return 9999999;
}
return %orig;
}

-(int)currentWrathOfElynia {       
if(GetPrefBool(@"kwrath")) {
return 9999999;
}
return %orig;
}

-(int)currentHandOfMidas {
if(GetPrefBool(@"kmidas")) {
return 9999999;
}
return %orig;
}

-(int)currentRodDragonFire {
if(GetPrefBool(@"krod")) {
return 9999999;
}
return %orig;
}

-(int)currentTimeWarp {
if(GetPrefBool(@"kwarp")) {
return 9999999;
}
return %orig;
}

-(int)currentHornsHeroism {
if(GetPrefBool(@"khero")) {
return 9999999;
}
return %orig;
}

-(int)currentTeleportScrolls {
if(GetPrefBool(@"kscroll")) {
return 9999999;
}
return %orig;
}

-(int)currentExtraGold {
if(GetPrefBool(@"kgold")) {
return 9999999;
}
return %orig;
}

-(int)currentHearts {
if(GetPrefBool(@"kheart")) {
return 9999999;
}
return %orig;
}

-(int)currentFreeze {
if(GetPrefBool(@"kfreeze")) {
return 9999999;
}
return %orig;
}

-(int)currentDynamites {
if(GetPrefBool(@"kdyn")) {
return 9999999;
}
return %orig;
}

-(int)currentAtomicFreeze {
if(GetPrefBool(@"katomic")) {
return 9999999;
}
return %orig;
}

-(int)currentAtomicBombs {
if(GetPrefBool(@"katomic")) {
return 9999999;
}
return %orig;
}

%end

%hook GameData

-(int)getCurrentStars {
if(GetPrefBool(@"kstar")) {
return 9999999;
}
return %orig;
}

-(int)starsSpent {
if(GetPrefBool(@"kstar")) {
return 0;
}
return %orig;
}

-(int)starsWon {
if(GetPrefBool(@"kstar")) {
return 9999999;
}
return %orig;
}

%end

%hook GameScene

-(int)currentLives {
if(GetPrefBool(@"klives")) {
return 9999999;
}
return %orig;
}

%end

%hook GameUpgrades

-(BOOL)heroesEnabled {
if(GetPrefBool(@"khero")) {
return TRUE;
}
return %orig;
}

-(BOOL)canSelectHero:(int)fp8 {
if(GetPrefBool(@"khero")) {
return TRUE;
}
return %orig;
}

-(BOOL)isUpgradeEnabled:(int)fp88 {
if(GetPrefBool(@"kupgrade")) {
return TRUE;
}
return %orig;
}

-(BOOL)archersUpPrecision {
if(GetPrefBool(@"kupgrade")) {
return TRUE;
}
return %orig;
}

-(BOOL)archersUpPiercing {
if(GetPrefBool(@"kupgrade")) {
return TRUE;
}
return %orig;
}

-(BOOL)archersUpSalvage {
if(GetPrefBool(@"kupgrade")) {
return TRUE;
}
return %orig;
}

-(BOOL)engineersSVUpShockAndAwe {
if(GetPrefBool(@"kupgrade")) {
return TRUE;
}
return %orig;
}

-(BOOL)archersSVUpImprovedAim {
if(GetPrefBool(@"kupgrade")) {
return TRUE;
}
return %orig;
}

-(BOOL)archersUpEagleEye {
if(GetPrefBool(@"kupgrade")) {
return TRUE;
}
return %orig;
}

-(BOOL)archersUpFarShots {
if(GetPrefBool(@"kupgrade")) {
return TRUE;
}
return %orig;
}

-(BOOL)barracksUpSurvival {
if(GetPrefBool(@"kupgrade")) {
return TRUE;
}
return %orig;
}

-(BOOL)barracksUpSurvival2 {
if(GetPrefBool(@"kupgrade")) {
return TRUE;
}
return %orig;
}

-(BOOL)barracksUpBetterArmor {
if(GetPrefBool(@"kupgrade")) {
return TRUE;
}
return %orig;
}

-(BOOL)barracksUpImprovedDeployment {
if(GetPrefBool(@"kupgrade")) {
return TRUE;
}
return %orig;
}

-(BOOL)magesUpSpellReach {
if(GetPrefBool(@"kupgrade")) {
return TRUE;
}
return %orig;
}

-(BOOL)magesUpEmpoweredMagic {
if(GetPrefBool(@"kupgrade")) {
return TRUE;
}
return %orig;
}

-(BOOL)magesUpHermeticStudy {
if(GetPrefBool(@"kupgrade")) {
return TRUE;
}
return %orig;
}

-(BOOL)engineersUpConcentratedFire {
if(GetPrefBool(@"kupgrade")) {
return TRUE;
}
return %orig;
}

-(BOOL)engineersUpRangeFinder {
if(GetPrefBool(@"kupgrade")) {
return TRUE;
}
return %orig;
}

-(BOOL)engineersUpFieldLogistics {
if(GetPrefBool(@"kupgrade")) {
return TRUE;
}
return %orig;
}

-(BOOL)isPremiumHero:(int)fp77 {
if(GetPrefBool(@"kupgrade")) {
return TRUE;
}
return %orig;
}

%end

%hook GameInApps

-(BOOL)hasHeroDwarf {
if(GetPrefBool(@"khero")) {
return TRUE;
}
return %orig;
}

-(BOOL)hasHeroMage {
if(GetPrefBool(@"khero")) {
return TRUE;
}
return %orig;
}

-(BOOL)hasHeroFire {
if(GetPrefBool(@"khero")) {
return TRUE;
}
return %orig;
}

-(BOOL)hasHeroDenas {
if(GetPrefBool(@"khero")) {
return TRUE;
}
return %orig;
}

-(BOOL)hasHeroFrost {
if(GetPrefBool(@"khero")) {
return TRUE;
}
return %orig;
}

-(BOOL)hasHeroViking {
if(GetPrefBool(@"khero")) {
return TRUE;
}
return %orig;
}

-(BOOL)hasHeroSamurai {
if(GetPrefBool(@"khero")) {
return TRUE;
}
return %orig;
}

-(BOOL)hasHeroRobot {
if(GetPrefBool(@"khero")) {
return TRUE;
}
return %orig;
}

-(BOOL)hasHeroThor {
if(GetPrefBool(@"khero")) {
return TRUE;
}
return %orig;
}

-(BOOL)hasHeroPirate {
if(GetPrefBool(@"khero")) {
return TRUE;
}
return %orig;
}

-(BOOL)hasHeroPriest {
if(GetPrefBool(@"khero")) {
return TRUE;
}
return %orig;
}

-(BOOL)hasHeroGolem {
if(GetPrefBool(@"khero")) {
return TRUE;
}
return %orig;
}

-(BOOL)hasHeroWizard {
if(GetPrefBool(@"khero")) {
return TRUE;
}
return %orig;
}

-(BOOL)hasHeroAlien {
if(GetPrefBool(@"khero")) {
return TRUE;
}
return %orig;
}

-(BOOL)hasHeroDragon {
if(GetPrefBool(@"khero")) {
return TRUE;
}
return %orig;
}

-(BOOL)hasHeroCrab {
if(GetPrefBool(@"khero")) {
return TRUE;
}
return %orig;
}

-(BOOL)hasHeroMonk {
if(GetPrefBool(@"khero")) {
return TRUE;
}
return %orig;
}

-(BOOL)hasHeroVanHelsing {
if(GetPrefBool(@"khero")) {
return TRUE;
}
return %orig;
}

-(BOOL)hasHeroDracolich {
if(GetPrefBool(@"khero")) {
return TRUE;
}
return %orig;
}

-(BOOL)hasHeroMinotaur {
if(GetPrefBool(@"khero")) {
return TRUE;
}
return %orig;
}

-(BOOL)hasHeroMonkeyGod {
if(GetPrefBool(@"khero")) {
return TRUE;
}
return %orig;
}

%end

%hook Level

-(BOOL)heroDied {
if(GetPrefBool(@"khero")) {
return TRUE;
}
return %orig;
}

-(BOOL)power2 {
if(GetPrefBool(@"kpower")) {
return TRUE;
}
return %orig;
}

-(BOOL)power1 {
if(GetPrefBool(@"kpower")) {
return TRUE;
}
return %orig;
}

%end

%hook MenuTowerItem

-(BOOL)isEnabled {
if(GetPrefBool(@"ktower")) {
return TRUE;
}
return %orig;
}

-(BOOL)isLocked {
if(GetPrefBool(@"ktower")) {
return FALSE;
}
return %orig;
}

-(int)price {
if(GetPrefBool(@"kprice")) {
return 0;
}
return %orig;
}

%end

%hook PowerPortrait

-(int)reloadTime {
if(GetPrefBool(@"kload")) {
return 0;
}
return %orig;
}

%end

%hook Enemy

-(int)health {
if(GetPrefBool(@"kenemy")) {
return 1;
}
return %orig;
}

-(int)initHealth {
if(GetPrefBool(@"kenemy")) {
return 1;
}
return %orig;
}

-(float)damageMultiplier {
if(GetPrefBool(@"kenemy")) {
return 0;
}
return %orig;
}

-(int)minDamage {
if(GetPrefBool(@"kenemy")) {
return 0;
}
return %orig;
}

-(int)maxDamage {
if(GetPrefBool(@"kenemy")) {
return 0;
}
return %orig;
}

-(int)getDamage {
if(GetPrefBool(@"kenemy")) {
return 0;
}
return %orig;
}

%end

%hook WaveSpawn

-(BOOL)spawnEnemies:(int)fp5 wave:(id)fp2 {
if(GetPrefBool(@"kspawn")) {
return FALSE;
}
return %orig;
}

%end

%hook Soldier

-(float)damageMultiplier {
if(GetPrefBool(@"ksol")) {
return 9999999;
}
return %orig;
}

-(int)health {
if(GetPrefBool(@"ksol")) {
return 9999999;
}
return %orig;
}

-(int)initHealth {
if(GetPrefBool(@"ksol")) {
return 9999999;
}
return %orig;
}

-(int)attackReloadTime {
if(GetPrefBool(@"ksol")) {
return 0;
}
return %orig;
}

-(int)attackChargeTime {
if(GetPrefBool(@"ksol")) {
return 0;
}
return %orig;
}

-(int)regenrateTime {
if(GetPrefBool(@"ksol")) {
return 0;
}
return %orig;
}

-(int)respawnTime {
if(GetPrefBool(@"ksol")) {
return 0;
}
return %orig;
}

-(int)deadTime {
if(GetPrefBool(@"ksol")) {
return 0;
}
return %orig;
}

-(int)reviveTime {
if(GetPrefBool(@"ksol")) {
return 0;
}
return %orig;
}

-(BOOL)canBlockEnemy:(id)fp1 {
if(GetPrefBool(@"ksol")) {
return TRUE;
}
return %orig;
}

-(BOOL)cheatDeath {
if(GetPrefBool(@"ksol")) {
return TRUE;
}
return %orig;
}

-(BOOL)isHero {
if(GetPrefBool(@"ksol")) {
return TRUE;
}
return %orig;
}

-(BOOL)canHeal {
if(GetPrefBool(@"ksol")) {
return TRUE;
}
return %orig;
}

%end

%hook Tower

+(BOOL)isTowerLocked:(id)fp6 {
if(GetPrefBool(@"ktower")) {
return FALSE;
}
return %orig;
}

-(int)damageMultiplierModifier {
if(GetPrefBool(@"ktower")) {
return 9999999;
}
return %orig;
}

-(void)addRangeModifier:(int)fp10 {
if(GetPrefBool(@"ktower")) {
fp10 = 9999999;
}
return %orig(fp10);
}

%end

%hook EnemyModifierShield

-(BOOL)isActive {
if(GetPrefBool(@"kshield")) {
return FALSE;
}
return %orig;
}

%end

%hook AppDelegate

-(void)applicationDidBecomeActive:(id)arg { 

UIAlertView *credits = [[UIAlertView alloc] initWithTitle:@"Hacked By John Kittz :D" 
                                                  message:@"Pwned<3" 
                                                 delegate:self
                                        cancelButtonTitle:@"Thank you!" 
                                        otherButtonTitles:@"follow Kittz", nil]; 
[credits show];
[credits release]; 
%orig();
}
 
%new
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
 
NSString *button = [alertView buttonTitleAtIndex:buttonIndex];
 
        if([button isEqualToString:@"follow Kittz"])
        {
                [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://mobile.twitter.com/John_Kittz?p=s"]];                                                                             
        }
}

%end

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