I'm having a bit of a problem with accessing an Array
I'm declaring it in the h file
and then in the init of the implementation I give it the values:
allowed1 = [[NSArray alloc] arrayWithObjects:@"12",@"13",@"14",@"15",@"16",@"24",@"25",@"26",@"34",@"37",@"35",@"36",@"47",@"45",@"46",@"57",@"56",@"67",nil]; [allowed1 retain];
I later on call this function:
void checkMove (int pos){ if (lastPos >= pos){ tempNum = pos*10 + lastPos; }else{ tempNum = lastPos*10 + pos; } NSLog(@"tempNum %i", tempNum); //should now have a string with selection from old Node to the new Node canPlay = NO; for (int i in allowed1){ do something } }
In this function allowed1 shows up as an undeclared identifier.
It seems to be some kind of scope issue, but I can't seem to get it right. Any help would be much appreciated.
Mark