Jump to content

How to return the id to TRUE or FALSE?


Go to solution Solved by Chrizk0,

13 posts in this topic

Recommended Posts

Posted

Hi ^_^

So i know the id can be returned to everything?

But how can i return it to TRUE or FALSE?

Do i simply write

return TRUE; ?

Thanks in advance :lol:

I think..

 

Set it to NSNumber then ->             return 1;
Posted (edited)

From tutorial

-(id)coins {
return [NSNumber numberWithInteger:999999];
}
/* id’s can be anything - a number, bool, string, etc. You have to call the correct NSClass to hack it correctly.
These are very rare - I myself have never had to hack one */

My guess might be

 

-(id)coins {
return [NSNumber +numberWithBool:YES];
}

 

 

-(id)coins {
return [NSNumber numberWithBool:YES];
}

YES = TRUE , NO = FALSE

 

or

 

-(id)coins {
return [NSNumber +numberWithBool:1];
}

 

1 = TRUE , 0 = FALSE

Updated by Amuyea
Posted

Don't work too :(

Maybe i can't return it to TRUE or FALSE

Did you try YES/NO? I might have edited the post before you did it xD

  • Solution
Posted (edited)

You can't return an ID with statements.

 

It can be a set of numbers, strings, etc.

 

So you have the wrong function, look for something else because ID can only be used like void and integer

Updated by Chrizk0

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