Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 2    Views: 42

BigAnth
Aspiring developer
Profile
Posts: 133
Reg: Jan 25, 2012
Sunderland
2,780
10/08/13 04:04 PM (12 years ago)

Submit score doesnt appear

Hi Guys I have done 2 Apps before using game centre tutorial but on to a third (a year since the last time i used it) Im on self hosted using the interactive quiz plugin, i have followed the guide (i think) When the app starts it asks to sign into game centre which does no bother - when i take a quiz however the "submit score" doesnt appear only try again or cancel Any ideas ? Thanks
 
Bonzo
Apple Fan
Profile
Posts: 783
Reg: Jan 30, 2012
Basingstoke
13,530
like
10/09/13 02:49 AM (12 years ago)
sounds like you've missed something somewhere :) bt_screen_quiz.h should have this at the bottom (just above the @end): -(void)submitScore; bt_screen_quiz.m Within the //quiz ended section you should have //Submit Score Button [finishedButtons addObject:NSLocalizedString(@"quizSubmitScore", @"SubmitScore")]; After the '//send quiz results to URL..' void you should add this void //submit score -(void)submitScore{ if(totalPoints > 0) { self.currentLeaderBoard = [self.screenData itemNickname]; [self.gameCenterManager reportScore: totalPoints forCategory: self.currentLeaderBoard]; } GKLeaderboardViewController *leaderboardController = [[GKLeaderboardViewController alloc] init]; if (leaderboardController != NULL) { leaderboardController.category = self.currentLeaderBoard; leaderboardController.timeScope = GKLeaderboardTimeScopeWeek; leaderboardController.leaderboardDelegate = self; [self presentModalViewController: leaderboardController animated: YES]; } } then within '//delegate method for action sheet clicks -(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {' you need to add //submit score if([buttonTitle isEqual:NSLocalizedString(@"quizSubmitScore", @"Submit Score")]){ [self submitScore]; } hope this helps :)
 
BigAnth
Aspiring developer
Profile
Posts: 133
Reg: Jan 25, 2012
Sunderland
2,780
like
10/09/13 11:51 AM (12 years ago)
thanks for this, however the submit button still doesnt show
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.