Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

julesv

macrumors newbie
Original poster
Apr 1, 2009
2
0
I have a simple game based on Image views.
The difficulty of the game is relative to this constant defined at the beginning of the M file as such:

#define Difficulty 13

I would like to change this value using a slider, but I am failing. Please help!
 

julesv

macrumors newbie
Original poster
Apr 1, 2009
2
0
I don't know... I'm very new so just tell me what's up in the program that is wrong. I guess I nave to learn via my mistakes. I thought that was a constant....
 

jnic

macrumors 6502a
Oct 24, 2008
567
0
Cambridge
Constants, by definition, can't be changed. You want a variable. Try:

Code:
int difficulty = 13;

You probably want to re-read the basics of Objective-C before continuing.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.