Gamecenter : Loadachievements Request Returns Event.data Nil

Hi guys,

I can’t seem to get the achievements in gamecenter working. I got the gamenetwork.init completed (tested on device and works fine logging in gamecenter sandbox) but then I can’t seem to get any achievements data by calling gamenetwork.request(“loadAchievements”,callback)

The problem is, the request callback is properly called but it gives no event.data at all a.k.a nil. What does it mean? Does it mean it can’t find achievement for my app? I believe I’ve set the achievement properly in itunes connect.

Any ideas? How to trace this problem?

thanks

Hi there,

I think gamenetwork.request(“loadAchievements”,callback) only returns achievements that the user has actually completed.  Have you completed any?  If not, that could explain why event.data is nil, like you’re seeing.

If you just want to load info about all the achievements that are available, you should use “loadAchievementDescriptions”.

Hope this helps!

  • Andrew

hey that makes sense, i’ll try that. 

thanks

Hi there,

I think gamenetwork.request(“loadAchievements”,callback) only returns achievements that the user has actually completed.  Have you completed any?  If not, that could explain why event.data is nil, like you’re seeing.

If you just want to load info about all the achievements that are available, you should use “loadAchievementDescriptions”.

Hope this helps!

  • Andrew

hey that makes sense, i’ll try that. 

thanks