I need help with Highscores

Posted by koffieleut
So I created a game for android, But I can't seem to write anything to the server.
In my events for login in to the server, the code works(I guess) I can't get any keyboard to show up.
Anywho, at the end of my game I'm using the regular codes.
global.Player_Name=get_string("nickname:","")
highscore_add(global.Player_Name, score);
gms_highscore_add ( list_id, score )
gms_highscore_add_guest(list_id,global.Player_Name, score, -1);

But it doesn't write to it.

Can I code it like everyone I a guest so the login window (which doesn't work) don't need to be accesed, and everybody can fill in they're name at the end of the game and it will be uploaded to the server?

some more info on the code, practicly everything from the documentation.

GMS
create

gms_init(GMS)
gms_settings(true, 1.0, -1, -1);

step

gms_step()

game_start

room_goto_next();

game_end

gms_logout()

networking

gms_network()

draw

gms_draw()


obj_login
the usual stuff but instead of using room_goto_n

Replies (1)

Last message on 15 Jun 2016

Size43 (Administrator) on 15 Jun 2016, 10:40:09
Please add a callback, and check if it is returning any error.

It's currently not possible to use names registered to accounts without logging in with username and password. This limitation will be fixed in the next major version of GameMaker Server (I don't have a release date for that yet).

For now, you could add a prefix (like Guest_) to every username, and filter those when drawing the highscores. Alternatively, you can use gms_login_player_has_account to check whether a username has an account registered.