user1612646
user1612646

Reputation: 69

Parse Issue Expected identifier

I am making an iPhone application and have had the error "Expected Identifier". In the error log there is a bold "parse issue" above it. It is in this code:

-(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];

}

The actual error is on the line:"-(void) showLeaderboard:{" And the little pointer is on the little bracket. Please Help. Thanks.

Upvotes: 0

Views: 1667

Answers (1)

Bot
Bot

Reputation: 11855

Remove the : from the method. It should only say -(void) showLeaderboard {

Upvotes: 1

Related Questions