Toxic Tom
Member
I am trying to user google play services in my app with achievement_login(), which is called on game start. This is the code in my Async - Social event:
The app appears to log in to Google Play Games as it shows the "Connecting to...", "Google Play Games" splash but global.PlayerName is always "Not logged in" and global.PlayerID is always -1.
What am I doing wrong?
Code:
if ds_map_exists(async_load, "id")
{
switch(async_load[? "id"])
{
case achievement_our_info:
//player has just logged in
global.PlayerName = async_load[? "name"];
global.PlayerID = async_load[? "playerid"];
show_message_async("GOOGLE SERVICES: User " + global.PlayerName + " with ID " + string(global.PlayerID) + " has logged in");
break;
}
}
What am I doing wrong?