Hello,
I am not familiar with completion handlers, but I'm adding Game Center functionality to my game and need the following code:
Code:
BOOL submit_ok = FALSE;
GKScore *scoreReporter = [[[GKScore alloc] initWithCategory:category] autorelease];
scoreReporter.value = score;
[scoreReporter reportScoreWithCompletionHandler:^(NSError *error) {
if (error == nil) {
submit_ok = TRUE;
}
}];
However, I get the following error:
Quote:
|
Assignment of read-only variable "submit_ok"
|
How am I supposed to access that variable inside the completion handler? Thank you very much!
Benoit