Android Question Google Play Service

Discussion in 'Programming' started by M.G., Oct 3, 2018.

  1. M.G.

    M.G. Member

    Joined:
    Jun 24, 2018
    Posts:
    10
    Hi,

    I want to create the Google Leaderboard.

    I have already set up everything in the google play console and everything installed.

    The Code in GameMaker Studio 2:

    obj_leaderboard

    Create Event:

    if !achievement_login_status()
    {
    achievement_login();
    }

    achievement_login();
    global.PlayerName = "Anon";
    global.PlayerID = -1;

    Async - Social Event:

    if ds_map_exists(async_load, "id")
    {
    switch(async_load[? "id"])
    {
    case achievement_our_info:
    global.PlayerName = async_load[? "name"];
    global.PlayerID = async_load[? "playerid"];
    show_debug_message("GOOGLE SERVICES: User " + global.PlayerName + " with ID " + string(global.PlayerID) + " has logged in");
    break;
    }
    }


    When I start the game on my phone, I am connected to Google Play.

    But I will not be logged in with my user account.

    Does anyone know the error?
     
  2. Etna Pixel

    Etna Pixel Member

    Joined:
    Dec 7, 2018
    Posts:
    14
    Pubblish Game on Beta Open in Google Play Dev Console! Set Tester Group and dowload our App from Play Store! After this passage Login Fix.
    ObjController with achievement_login(); it must be the first object of the whole project! in addition you need to set the App Id on the Android / Social section and enable Google play service!
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice