• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Help Needed.Trying to save initial google play user id

ricardo1996

Member
Hi. Im trying to save the inital googleplay player id to prevent duplicate scores to multiple accounts. S i thought il just save the id of the inital login into global.playerid and save it along side the rest of saved data. then another variable tempplayerid whih i use to log the current playerid. i then use the tempplayer var and compare it to the global.playerid if they are the same id then il uplad scres to leaderboard.

bu im having issues in the async social event. data structure index does not exist. helpplease this is a must needed implementation.
Code:
if(ds_exists(async_load, ds_type_map)){
    if(ds_map_find_value(async_load, "id") == achievement_our_info){
        tempplayerid = ds_map_find_value(async_load, "playerid");
        if(global.playerid == -1) {
            global.playerid = tempplayerid;
            safe_ini_open(Fn,Pw);
            safe_ini_write_real("player", "info", global.playerid);
            safe_ini_close();
        }
    }
}
 
Top