NSString *temp = [self randomBallPick:temp];
the following error: Pass-by-value argument in message expression is undefined
why?
-(NSString*) randomBallPick:(NSString*) oneFilename
{
//create an array of filenames
NSMutableArray *imageArray = [[NSMutableArray alloc] init];
for (int c=0;c<37;c++)
{
NSString *imageName = [NSString stringWithFormat:@"ball_%d.png", c];
[imageArray addObject: imageName];
}
//pick one filename
int numFileNames = [imageArray count];
int chosen = arc4random() % numFileNames;
oneFilename = [imageArray objectAtIndex: chosen];
[imageArray release];
return oneFilename;
}