开发者

if statement is giving me some trouble

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 ty开发者_如何转开发po here that I'm not seeing?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜