gms_highscore_add
Usage: gms_highscore_add ( list_id, score )
Description
Adds the score to the highscorelist. If the user does have a saved score, it will be replaced
Replies (21)
Last message on 24 Feb 2019
2dSlug
on
9 Nov 2018, 14:11:37
I have a question about highscore when compiling to android. Works fine when running in windows, but when compiling to android 2 errors occur:
Final Compile...Error : gml_Script_XServer_variable_local_get(0) : using uninitialised variable 'secure_mode'
Error : gml_Script_XServer_updateposition(97) : using uninitialised variable 'smoothSpeed'
So I set secure_mode=true & smoothSpeed=true in create event of GMS object. Now it compiles but it takes 30sec to start the test apk with highscore, but it works.. Why the looong load time?
BR 2dSlug
Teroil
on
13 Feb 2019, 23:51:33
Hi, I'm having a similar issue, but I don't get any errors. Connecting to the server takes ~45 seconds on Android, but on pc it's instantaneous. 45 seconds to load every time you boot up the game is unfortunately too long and the player will think the game doesn't work. 2dSlug did you find a solution to the problem? Size43 do you have any recommendations on what should I try to improve the connection time?
Size43
(Administrator)
on
24 Feb 2019, 20:40:07
Size43
(Administrator)
on
18 Nov 2018, 15:10:19
Note that the YYC is currently not supported as an export.
A 30 second wait time sounds like the game is somehow not able to connect to the server on the first attempt, thus taking longer to connect.
I DONT KNOW WHY ARE U ASKING ME?
sry tho
Hello, I'm back. Is there function to remove certain highscore? I know I can do it via website, but I want to remove them in-game.
Size43
(Administrator)
on
20 Aug 2015, 21:45:14
You can replace / update the highscores of the player that's logged in, but it's impossible to remove a highscore in-game. (Because of the way GameMaker Server works, being able to remove any highscore would mean anyone could clear the highscores of any game. That's why I've chosen to only allow replacing/updating your own score programatically.)
I can do that to remove certain highscore?
gms_highscore_add ( list_id, -gms_highscore_self_score ( list_id ))
How do I embed this on my website if its possible? if its not possible, could you maybe add it? I really wanted a list of the top players on my website :P
Size43
(Administrator)
on
9 Aug 2015, 14:15:59
Apologies for my delayed responses. As you may know, Outlook is blocking all GameMaker Server mails which means I don't get notified when you post a reply.
On the developer page of your game, there's a link "Dynamic images". You can generate URLs for images with the number of players online and for specific highscores. You can also configure colors & font size.
Nevermind, i managed to get highscore window showing, but it is always blank, no highscores D:
So could you please help me show the highscore list? It shows a window, but it is blank, only I can view highscores via game setting on this site.
Size43
(Administrator)
on
22 Aug 2014, 10:31:22
The ID should be visible on the highscore settings page, but it isn't. If you look at the address bar, you should see something like this: developer/game/xxx/highscores/yyy/. yyy is the highscorelistID. I'll add the highscoreID to the highscore settings page as soon as I can.
Soo how do i make highscore list shown? Highscore window shows, but it is blank there aren't any highscores in it, even though highscores page here (on site) shows all of them.
Size43
(Administrator)
on
22 Aug 2014, 11:36:30
I've added the HighscorelistID to the "Edit highscore" page. Please make sure you're calling
gms_show_highscore with the right ID. Please also make sure the game is connected to the server by checking
gms_info_isconnected.
If you're calling
gms_show_highscore before the scores are received they may not be updated properly.
I am having the same problem. I've done all the ID stuff but my highscore screen is blank, despite the entries which are visible on my developer page!
Size43
(Administrator)
on
21 Nov 2014, 17:39:21
I'll look into this. Do the highscore functions themselves work or in other words, are you able to see the correct highscore information when calling functions like
gms_highscore_name?
I tested that script and it works just fine too! The issue is with the drag and drop highscore table. Do you think you'll be able to sort it out before the indiesvspewdiepie jam ends? Or could you perhaps show me how to draw my own highscore table with ranks?
Size43
(Administrator)
on
22 Nov 2014, 16:18:29
I'm working on fixing it, but it'll have to go into the next big update. While the update is almost done, I do want to make sure I release something that actually works, so no guarantees :)
Here's how to draw highscores using the gms_highscore_* functions (set hID to your highscorelist ID):
var n, hID;
hID = 10;
for(n = 0; n < server_highscore_count(hID); n += 1)
{
draw_text(x, y + i * 32,
string(i + 1) + ". " + server_highscore_name(hID, i))
draw_text(x + 300, y + i * 32,
string(server_highscore_score(hID, i)))
}
You'll probably need to edit the x and y positions a bit. ;)
Hi. How i am supposed to know which List Id has the highscore list?