开发者

if statement is giving me some trouble

开发者 https://www.devze.com 2023-01-03 06:40 出处:网络
For some reason, this if statement is giving me an \"Expected : before ] token. if ([ [mine commodity] isEqualToString:@\"Gold\"] && [gold == YES])

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

精彩评论

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