Okay. I have been trying organise this nsmutable array so my program can use it in the way I want.
I started off with a standard NSMutable array then use the addobject: method to populate it and then also populated it with more NSMutableArrays (so array in arrays). Because of this I need to call the ObjectAtIndex: method a lot and also the replaceObjectAtIndex: withObject: method alot. Also because you can only ad object with type ID to NSMutableArrays (I think at least) I've had to convert all of my double variables to NSNumbers and then back to doubles to maths with and then back to NSNumbers to store again... Hardly efficient.
But the main problem is (the previous things were just stuff I was curious about), this code:
NSMutableArray * array = [tmp objectAtIndex x];
[tmp replaceObjectAtIndex:x withObject: [array replaceObjectAtIndex:2 withObject: result]];
Xcode says the problem is on the second line, I just added the firrst for a bit on context. Result is an NSNumber and tmp is also a NSMutableArray. Xcode says the error is "Sending 'Void' to parameter of incompatible type 'id'".
I'd really appreciate any help :). Thanks!