I'm creating a game and I need to call an action. My problem is that I need the function being called to change according to the level the user is one. I have the whole thing basically worked out where the game finds what level the user is one and then adds one to it but since the game has 50 levels so far using if statements is kind of stupid. So I have been experimenting with makeing a string that has an integer value that changes but I can't get my application to recognize that the string is a function and nothing happens.
Thus what i have and have tried many variations of this idea:
Code:
int points = [num.text intValue]; /*find the level*/
points = points +1
function = [NSString stringwithFormat:@"Q%iR:(id)sender", points];
[self function];