I am using marmalade extension for TapJoy and using the SDK and sample project from here.
The function used here for getting TapPoints of user is:
s3eResult TapjoyGetTapPoints(TapjoyGetTapPointsCallbackFn callbackFn, void* userData)
Which returns s3eResult
type showing just success or failure of the query. But how do I get the actual points in int or any other number type?
What I am using is like this:
int TapJoy::GetPoints(){
s3eResult res=TapjoyGetTapPoints((TapjoyGetTapPointsCallbackFn)&TapJoy::GetTapPointsCB, NULL);
return GetTapPointsCB(NULL,NULL);
}
int32 TapJoy::GetTapPointsCB(TapjoyGetTapPointsResult* result, void* userData)
{
int tapPoints = result->m_PointTotal;
sprintf("Points", "`x666666Tap Points: %d", tapPoints);
s3eDebugTracePrintf("GetTapPointsCB called with amount: %d", tapPoints);
cout<<tapPoints<<endl;
return tapPoints;
}
The problem in this code is how do I get TapjoyGetTapPointsResult* result
?