سؤال

I'm asking because i'm getting a "!" caution warning

asking me to replace %i with %li:

 else if ([sender tag] == 8)
    {
        SKProduct *product = [_products objectAtIndex:6];

        NSLog(@"Buying %@...", product.productIdentifier);
       [[RageIAPHelper sharedInstance] buyProduct:product];
  }

here

  NSLog(@"TAG IS: %i", (long)[sender tag]);

}

If I change it will it still be ok?

هل كانت مفيدة؟

المحلول

%i prints an int, but %li prints a long. Since you are printing a long, you should change it.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top