"Reference to non-static member function must be called" error when trying to use App42 Services

0 votes

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
asked Nov 20, 2014 in App42 Cloud API-BaaS by sandjay (10 points)
recategorized Mar 3, 2015 by sushil

1 Answer

0 votes

Hi,

Please follow our Sample project, it has test cases for all the APIs in Tests folder. Please use our latest SDK with version 1.7.1.

Let us know if you face further problem.

Thanks.

answered Nov 20, 2014 by rajeev.etc (1,660 points)
I hope your query has been resolved, kindly let us know if you have more questions for us.
Thanks,
Himanshu Sharma
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...