I'm making an iOS app which is OpenFeint enabled. I have managed to get all but one achievement to work. This one achievement is a partially completed one.
My specific problem is that I haven't found a working solution to add 1% to the current achievement percentage.
I found this value (it's supposed to be a double
):
double achievement12 = [OFAchievementService getPercentComplete:ach12Id
forUser:[OpenFeint lastLoggedInUserID]];
but this causes the following errors and warnings:
"Cannot convert 'objc_object*' to 'double' in initialization.
'OpenFeint' may not respond to "+lastLoggedInUserId"
'OFAchievementService' may not respond to "+getPercentComplete:forUser:"
The actual function code is:
// Note: this should be moved into public API
+ (double) getPercentComplete:(NSString*)achievementId forUser:(NSString*)userId
{
sAlreadyAtLeastPartlyCompleteQuery.bind("achievement_definition_id", achievementId);
sAlreadyAtLeastPartlyCompleteQuery.bind("user_id", userId);
sAlreadyAtLeastPartlyCompleteQuery.execute();
float percentComplete = (double) (sAlreadyAtLeastPartlyCompleteQuery.getDouble("percent_complete"));
sAlreadyAtLeastPartlyCompleteQuery.resetQuery();
return percentComplete;
}
This is the last thing I have to do on this app, and it has been bugging me for a few days now.
OpenFeint support said that they have not integrated that part due to security issues.
With that said, i have now resorted to storing a file with the data in so i can retrieve it later (using an equation to hide the real value of course)