Using the App42 sample application, as well as the documentation on the site below:
http://api.shephertz.com/app42-docs/leaderboard-service/
I seem to be encountering a "Reference to non-static member function must be called" for both of these method calls:
void GameScene::createGame()
{
App42API::Initialize("myKEY", "mySECRET");
GameService *gameService = GameService::getInstance();
gameService ->CreateGame("ArcadeGame", "TopPlayers", this, app42callfuncND_selector(GameScene::onGameRequestCompleted));
}
void GameScene::createGame()
{
App42API::Initialize("myKEY", "mySECRET");
ScoreBoardService *gameScoreBoard = ScoreBoardService::getInstance();
gameScoreBoard ->SaveUserScore("ArcadeGame", "JohnDoe", score, this, app42callfuncND_selector(GameScene::onScoreBoardRequestCompleted));
}
I had originally tried using "App42API::BuildGameService();" instead of "GameService::getInstance()", and "App42API::BuildScoreBoardService();" instead of "ScoreBoardService::getInstance();" but even that gave me the same "Reference to non-static member function must be called" error.
I don't quite understand what I'm doing wrong; am I calling the methods wrongly? are there some pre-requisite steps I need to do prior to calling the methods?
Any advice / insight would be greatly appreciated!!!
Thanks and Best regards,
sandjay