It don't works.
Code:
if (! [[COLOR="Red"]machineArray[/COLOR] count] ){
NSMutableArray *[COLOR="Blue"]machineArray[/COLOR];
machineArray = [[NSMutableArray alloc] init];
}
WHYYYYYYYYYYYYYYYYY?
I'm going mad
Xcode says Use of undeclared identifier 'machineArray'
It should be pointing you at the one I've hilited in red. Is it?
You then make a mistake, by declaring a local variable named machineArray (blue). This is a
completely different variable than the one referred to by the red name. If you didn't realize this, then you need to go back and study how variables are declared and why (or why not).
There are other mistakes, such as alloc'ing and then leaking, but we need to know exactly what you want to accomplish in order to address those.
So please explain exactly what you want to accomplish.
Do you already have an instance variable named machineArray? If so, show the code for it. The complete code, in the complete @interface of the class. Not just isolated fragments.
If you don't already have an instance variable named machineArray, is that what you want? If you don't know, or you don't know what an instance variable is, then you need to explain overall what you're trying to do.
Again, this looks like you don't have a good understanding of the fundamentals. You can't progress without that understanding, yet you seem unwilling to help us help you by telling us what you're using to learn.