Jump to content

Help on first hook for tweak.xm


Go to solution Solved by Rook,

7 posts in this topic

Recommended Posts

Posted (edited)

 

Here is what it looked like before I edited it again. I am aware that my hook is wrong right here, I believe I corrected it in the second one though.

Spoiler

%hook -(int) getCurrentStars

 

// Hooking a class method

+ (id)1000 {

    return %orig;

}

 

-What my first hook looks like after my 2nd edit

Spoiler

 

%hook GameData

 -(int) getCurrentStars

  return 1000;

 )

 
 

for Every unitI have, do I need to make a hook for ever unit that is in my flex patch? 

Updated by datagen
I posted images of my code instead of text.
Posted

Please read our "How to Properly Post a Support Topic" here: https://iosgods.com/topic/49670-read-how-to-properly-post-a-support-topic/

Posted
1 minute ago, Ted2 said:

%hook GameData

 -(int) getCurrentStars {

  return 1000;

 }

%end

Best hacker, thank you

  • Solution
Posted
%hook GameData
 -(int) getCurrentStars {
    return 1000;
}

That’s the correct syntax. :)

Posted
5 hours ago, DiDA said:

%hook GameData
 -(int) getCurrentStars {
    return 1000;
}

That’s the correct syntax. :)

And for every unit in my flex patch, do I have to make a hook?

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