views:

39

answers:

1

For some reason, this if statement is giving me an "Expected : before ] token.

    if ([ [mine commodity] isEqualToString:@"Gold"] && [gold == YES])
    {
        [tempMine setAnnotationType:iProspectLiteAnnotationTypeGold];
        [mapView addAnnotation:tempMine];
    }

is there some typo here that I'm not seeing?

+5  A: 

[gold == YES] should be gold == YES. The square brackets are for method invocations, and == isn't a method.

Tom Dalling