steam leaderboard upload score not working as expected with k_ELeaderboardUploadScoreMethodKeepBest

Hi, I am currently having a issue with uploading scores to steam leaderboards but only for updated scores.

I am using the steam Api Directly i.e

SteamAPICall_t hSteamAPICall =
		SteamUserStats()->UploadLeaderboardScore(m_CurrentLeaderboard, ELeaderboardUploadScoreMethod::k_ELeaderboardUploadScoreMethodKeepBest, score, NULL, 0);

This works for the first time a user enters a score but if this is called again the user score is not updated even though it is a much better score then the one previously entered, reading the steam API documentation using the ELeaderboardUploadScoreMethod::k_ELeaderboardUploadScoreMethodKeepBest enum should keep the best score but it just keeps the first score uploaded for that user.

now if I use the ELeaderboardUploadScoreMethod::k_ELeaderboardUploadScoreMethodForceUpdate enum then the score updates / overwrites every time you upload a score regardless of score as expected but why does the k_ELeaderboardUploadScoreMethodKeepBest calculate the best score incorrectly??

i thought it might of some format issue but the value is an int so don’t see how the comparison could be wrong (the leaderboard is set to numeric)

Any help or info on this would be great thanks

1 Like

Hi, just had the same problem and was able to fix it.

I suppose you have a stat with the name of the leaderboard as in.
Leaderboard name: test
Stat name: test_test

Make sure that the stat test_test has “Increment Only” set to true in Steamworks backend.
After that using k_ELeaderboardUploadScoreMethodKeepBest should work just fine! :slight_smile:

2 Likes