Tipo de argumento inválido void to unary expression

Actualmente estoy haciendo una aplicación y estoy teniendo alguna dificultad, aquí está el código:

-(void) alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)ButtonIndex { if (ButtonIndex == 1) { - (void) reportScore: (int64_t) score forCategory: (NSString*) category { GKScore *scoreReporter = [[[GKScore alloc] initWithCategory:@"123"] autorelease]; scoreReporter.value = score; [scoreReporter reportScoreWithCompletionHandler:^(NSError *error) { if (error != nil) { // handle the reporting error } }]; else if (ButtonIndex==2){ - (void) showLeaderboard: { GKLeaderboardViewController *leaderboardController = [[GKLeaderboardViewController alloc] init]; if (leaderboardController != nil) { leaderboardController.leaderboardDelegate = self; [self presentModalViewController: leaderboardController animated: YES]; } } } } -(void) leaderboardViewControllerDidFinish:(GKLeaderboardViewController *)viewController{ [self dismissModalViewControllerAnimated:YES]; } } } 

Mi problema es que en la línea: – (void) reportScore: (int64_t) ………… dice "Tipo de argumento inválido void to unary expression"

Por favor ayuda, gracias.

Está declarando methods dentro de otro método, lo que no puede hacer. Declara todos sus methods por separado, y llámelos cuando corresponda.

 - (void) reportScore: (int64_t) score forCategory: (NSString*) category { GKScore *scoreReporter = [[[GKScore alloc] initWithCategory:@"123"] autorelease]; scoreReporter.value = score; [scoreReporter reportScoreWithCompletionHandler:^(NSError *error) { if (error != nil) { // handle the reporting error } }]; } - (void) showLeaderboard: { GKLeaderboardViewController *leaderboardController = [[GKLeaderboardViewController alloc] init]; if (leaderboardController != nil) { leaderboardController.leaderboardDelegate = self; [self presentModalViewController: leaderboardController animated: YES]; } } -(void) leaderboardViewControllerDidFinish:(GKLeaderboardViewController *)viewController { [self dismissModalViewControllerAnimated:YES]; } -(void) alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)ButtonIndex { if (ButtonIndex == 1) { [self reportScore:score forCategory:cat]; } else if (ButtonIndex==2) { [self showLeaderboard]; } }