App42 Marmalade callback function not working

0 votes

I am trying to get App42 to work with Marmalade.  When I call GameService::GetAllGames and pass in my callback function, the callback function is never performing.  Is there some sort of update function or event trigger function that I  need to call to get all of the callback functions to work?  I attached my code.  Let me know you see anything that is wrong.  For right now I am just doing everything inside the Leaderboards::Initialize();  That initialize is being called somewhere else.

 

class Leaderboards
{

private:
static GameService* gameService;
static ScoreBoardService* scoreboardService;
static ScoreService* scoreService;
static RewardService* rewardService;
 
public:
Leaderboards();
~Leaderboards();
 
static void Initialize();
static void Update();
static void Connect();
static void Shutdown();
};
 
class CApp42Callback : public IApp42Callback
{
public:
CApp42Callback(){;}
void onResult(App42Result* _result);
 
};
 
 
Leaderboards::Leaderboards()
{
 
}
 
Leaderboards::~Leaderboards()
{
 
}
 
void Leaderboards::Initialize()
{
GameService::Initialize(APP_WARP_API_KEY, APP_WARP_SECRET_KEY);
 
gameService = GameService::GetInstance();
 
CApp42Callback* authGameCallback = NULL;
 
GameService::GetInstance()->GetAllGames(authGameCallback);
gameService->GetAllGames(authGameCallback);
 
if(authGameCallback)
{
delete authGameCallback;
authGameCallback = NULL;
}
}
 
void Leaderboards::Update()
{
 
}
 
void Leaderboards::Connect()
{
 
}
 
void Leaderboards::Shutdown()
{
 
}
 
void CApp42Callback::onResult(App42Result* _result)
{
IwDebugTraceLinePrintf("GameResult::body is %s", _result->getBody().c_str());  
bool thisThing = true;
thisThing = false;
}
 
asked Jun 19, 2014 in App42 Cloud API-BaaS by sawaydastudios (16 points)

1 Answer

0 votes

Hi,

Thanks for sharing the code snippet with us.

Can you share the logs details with us when you are calling the function.

Also you can refer our sample which help you to integrate the leaderboard in your game.

Thanks.

answered Jun 19, 2014 by hs00105 (517 points)
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
...