Is this a bug or how it works (gameNetwork.request("loadPlayers"))

I have my game working fine on iOS and am trying to get it working on Android.

I am using gameNetwork.request(“loadPlayers”) to load my leaderboard scores in but have noticed slightly different behaviour in Android.

In the listener I use event.data to read the alias and playerID, the problem is if there is only one player returned Google Play Services returns it like event.data.alias etc… where as GameCenter is event.data[1].alias

Can anyone else confirm this please (or maybe am going mad) ?

Dave

I seem to remember that being a problem when we first started working with it.  You could simply put a test in:

if event.data.alias[1] then

    – process as an array

else

    – process as a single entry

end

Rob

Cheers Rob, thought I was going mad.

Dave

I seem to remember that being a problem when we first started working with it.  You could simply put a test in:

if event.data.alias[1] then

    – process as an array

else

    – process as a single entry

end

Rob

Cheers Rob, thought I was going mad.

Dave

Solved my problem. Thanks for figuring this out!

Solved my problem. Thanks for figuring this out!