Hi, Hoping I am posting in the right area, as I think I might be doing come code wrong, but I have been trying to make it so at the end of my game the score is uploaded to a Steam leaderboard. I am unsure what I am doing wrong, I have followed the documentation in the steam leaderboard section on the GMS2 manual, and copied the code over, but changed it for my game. Put the below in the "Step" event.
and then put the below in the async - steam event
but whenever I put the build in steam and try and test it, it doesn't work. I know the game can interact with steam as the achievements work. I've not been able to find a tutorial on this so not sure if Ive missed a fundimental step.
any suggestions would be helpful as not sure what to do now.
GML:
if (global.Steam_loadboard)
{
upload_ID = steam_upload_score("Game Scores", global.score);
if (!upload_ID)
{
alarm[0] = room_speed;
}
}
GML:
var type = ds_map_find_value(async_load, "event_type");
if (type == "leaderboard_upload")
{
var lb_ID = ds_map_find_value(async_load, "post_id");
if lb_ID == upload_ID
{
var lb_name = ds_map_find_value(async_load, "lb_name");
var lb_done = ds_map_find_value(async_load, "success");
var lb_score = ds_map_find_value(async_load, "score");
var lb_updated = ds_map_find_value(async_load, "updated");
show_debug_message("leaderboard post id:" + string(lb_ID) + " to lb:" + string(lb_name) + " with score:" + string(lb_score) + " updated=" + string(lb_updated));
if (lb_done)
{
show_debug_message("- Succeeded");
}
else
{
show_debug_message("- Failed");
}
}
}
any suggestions would be helpful as not sure what to do now.