Jump to content

%end does not make sense inside block


Go to solution Solved by Ted2,

25 posts in this topic

Recommended Posts

Posted

%hook UserInfo
-(unsigned int) "What is function name" fp8 getConsumableAmountOfType:(int)fp12 { //Tell functionname
fp8 = 1;
fp12 = 1;
return %orig; //if you don't wanna return it anything, I think you need to do: return; or return %orig; (not just %orig, not sure tho)
}
%end

  • Replies 24
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted
3 minutes ago, Ted2 said:

%hook UserInfo
-(unsigned int) "What is function name" fp8 getConsumableAmountOfType:(int)fp12 { //Tell functionname
fp8 = 1;
fp12 = 1;
return %orig; //if you don't wanna return it anything, I think you need to do: return; or return %orig; (not just %orig, not sure tho)
}
%end

I thought you knew everything gosh.

Nobody but me seems to use the code functionality..

Posted
Just now, Fadexz said:

I thought you knew everything gosh.

Nobody but me seems to use the code functionality..

You need to declare the original function name, with arguments you don't have to, you can use fp8 etc etc.

The unsigned int is the main function name, now in your code it doesn't have a function name & obviously it will generate errors.

Posted (edited)
6 minutes ago, Ted2 said:

%hook UserInfo
-(unsigned int) "What is function name" fp8 getConsumableAmountOfType:(int)fp12 { //Tell functionname
fp8 = 1;
fp12 = 1;
return %orig; //if you don't wanna return it anything, I think you need to do: return; or return %orig; (not just %orig, not sure tho)
}
%end

6XSf2pQ.png

This's the unit from flex

Updated by Demi-God
Posted
4 minutes ago, Ted2 said:

-(unsigned int) getConsumableAmountOfType:(int)fp12 {

 

Use this on the line

But what about the two returned value? fp8 = 1

fp12 = 1

Posted
1 minute ago, Demi-God said:

But what about the two returned value? fp8 = 1

fp12 = 1

There is only one argument in your screenshot

%hook UserInfo
-(unsigned int) getConsumableAmountOfType:(int)fp12 {
return 1; //returns the unsigned int
fp12 = 1; //returns the argument
}
%end

Posted (edited)
1 minute ago, Fadexz said:

@Ted2 Just out of interest.. what's the difference between using e.g "arg1" and "fp8" or "fp12"?

Nothing, you can use whatever you want. (gay, ass, lesbian etc etc). Alsong as you return them

Updated by Ted2

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