Hi, the only feature of GameMaker Server I need for my current game is the online highscores. However, when I try to add the score to the highscore list, it says it doesn't exist even though it certainly does. I use gms_highscore_add_guest(list_id,"name",score,e_ok) code to add it, list_id replaced with the list id of course.
I have obj_gms which is only in one room where I initialize all the variables.
Information about object: obj_gms
Sprite:
Solid: false
Visible: true
Depth: -100000
Persistent: true
Parent:
Children:
Mask:
No Physics Object
Create Event:
execute code:
gms_init(obj_gms)
gms_settings(true, 1.0, obj_hermo, obj_other_player);
Step Event:
execute code:
gms_step()
Other Event: Game End:
execute code:
gms_logout()
Draw Event:
execute code:
gms_draw()
What do I need to do to? To clarify, I don't need any multiplayer features in this game. Only online highscores. Thanks
Replies (3)
Last message on 11 Jan 2016
Size43
(Administrator)
on
3 Nov 2015, 19:37:16
You should replace e_ok with the name of a script that handles the server response. Please see the
gms_highscore_add_guest-script for an example.
Ps. Note that you may use -1 instead of an object if you don't need the extension to sync the player object for you :)
lakko
on
7 Jan 2016, 12:00:11
Do you mean:
gms_highscore_add_guest(list_id,"name",score,-1); ?
Or the last statement must always be a script?
Size43
(Administrator)
on
11 Jan 2016, 12:33:35
I meant that you can just write
gms_settings(true, 1.0, -1, -1);
if you don't want the player to be synced. You won't have to add an other player object either.
The last argument to gms_highscore_add_guest does need to be a script.