Android Configuration Login Issue

Posted by Pick
Hi,

This is a big issue for me at the moment as I am trying to release an Android version of my game. When using the Android Configuration on Windows/Android Port, the code below doesn't work. However, if I use the Windows port and Windows Configuration, the code below does work. I would love a response, and really need a fix ASAP, thanks!
var global.getLoginUsername = get_string('Username','') // Asks for username

var global.getLoginPassword = get_string('Password','') // Asks for password

gms_login_set_username(global.getLoginUsername) // Sets the username

gms_login_set_password(global.getLoginPassword) // Sets the password

gms_login_execute(scr_login) // Goes to login excecute script - runs login


The SCR_LOGIN script code is in the comments below as I could not fit it all into this one thread/post.

Replies (5)

Last message on 5 Jan 2018

Size43 (Administrator) on 3 Jan 2018, 11:48:30
Just to confirm, the (All) version doesn't work on Windows AND not on Android?

Are you maybe missing gms_network() in the async networking event?
Pick (Topicstarter) on 4 Jan 2018, 12:24:22
The game works when I use Android Port and Windows configuration, however if I try Android Port and Android Configuration, the code above doesn't work and stuff like that, I get random errors such as my account being banned 100+ times in the login screen.

gms_network() is being called in the networking event in GMS.
Pick (Topicstarter) on 4 Jan 2018, 12:25:08
This whole Android port and Windows Configuration is making my game unplayable on older devices, as it's basically running a Windows game just moved to Android. Hopefully you can fix this fast, thanks!
Size43 (Administrator) on 5 Jan 2018, 17:03:11
Sorry, I'm not very familiar with the way configurations work in GM:Studio. What exactly is different between the android configuration and the windows configuration?

It sounds like the game is simply not connecting to the server.

Does gms_info_isconnected() return true at all?

Also try setting a script using gms_script_set_kick that just shows a message of the kick reason or something similar. That'll let you know if the server is kicking you for any reason.
Pick (Topicstarter) on 31 Dec 2017, 20:31:08
SCR_LOGIN:

switch(argument0)
{
    case e_ok:
        show_message("Login SUCCESS");
        room_goto(rm_maps);
        break;
    case e_already_logged_in:
        show_message("You are already logged in!");
        break;
    default:
        show_message(gms_login_error_tostring(argument0));
        break;
}