Hi,
So, I’ve been trying to get a leaderboard working, which uploads to Steam’s leaderboards, and I can’t seem to upload Float values. It still creates the leaderboard on Steam, and Integer values work fine, but uploading Floats doesn’t add an entry into the leaderboard.
if (OnlineSub) {
IOnlineLeaderboardsPtr Leaderboards = OnlineSub->GetLeaderboardsInterface();
if (Leaderboards.IsValid() && uniqueNetIdPtr.IsValid()) {
WriteObject.LeaderboardNames.Add(leaderboardName);
WriteObject.SortMethod = ELeaderboardSort::Descending;
WriteObject.DisplayFormat = ELeaderboardFormat::Seconds;
WriteObject.UpdateMethod = ELeaderboardUpdateMethod::Force;
WriteObject.SetFloatStat(leaderboardName, score);
WriteObject.RatedStat = leaderboardName;
if (Leaderboards->WriteLeaderboards(sessionName, *uniqueNetIdPtr.Get(), WriteObject)) {
Leaderboards->FlushLeaderboards(sessionName);
}
}
}
Specifically, SetIntStat uploads an leaderboard and an entry with this code just fine, but SetFloatStat only creates a leaderboard. I’ve even tried setting the Stat on Steam to both Float and Int, and it still doesn’t work.
If anyone could help me with this, I’d appreciate it very much.