gamecenter.submitScore and gamecenter.showLeaderboard without a specific leaderboard ID (ie just using the default leaderboard) work fine.
But, when adding a leaderboard ID, very strange behaviour occurs, even if the functions aren't called (ie commenting and uncommenting the lines is enough to produce the error).
The error is that setup()
, and possibly other functions, cannot call functions that are in tabs to their right/below (as defined by the buffer order in Info.plist)
I wonder whether this is connected to the unused variable 'weakSelf'
warning/error that the gamecenter addon throws for line 160, which is inside the showLeaderboardWithID
function:
- (void) showLeaderboardWithID:(NSString *)leaderboardID { __weak __typeof(&*self)weakSelf = self;
discussion here: https://codea.io/talk/discussion/7329/strange-xcode-gamecenter-issue-i-cant-call-functions-in-tabs-to-the-right-of-main-lua?new=1