/ nil being written to leaderboard cache

This commit is contained in:
FajsiEx 2021-12-16 21:31:06 +01:00
parent 7e3e2badc2
commit 4384640c68
1 changed files with 2 additions and 2 deletions

View File

@ -727,7 +727,6 @@ function onIrLeaderboardFetched(res)
local song = songwheel.songs[selectedIndex]; local song = songwheel.songs[selectedIndex];
local diff = song and song.difficulties[selectedDifficulty] or false; local diff = song and song.difficulties[selectedDifficulty] or false;
irLeaderboardsCache[diff.hash] = irLeaderboard;
game.Log(diff.hash, game.LOGGER_ERROR) game.Log(diff.hash, game.LOGGER_ERROR)
if res.statusCode == IRData.States.Success then if res.statusCode == IRData.States.Success then
@ -744,6 +743,7 @@ function onIrLeaderboardFetched(res)
-- end -- end
irLeaderboard = tempIrLB; irLeaderboard = tempIrLB;
irLeaderboardsCache[diff.hash] = irLeaderboard;
game.Log(dump(irLeaderboard), game.LOGGER_ERROR) game.Log(dump(irLeaderboard), game.LOGGER_ERROR)
else else
@ -1017,7 +1017,7 @@ set_diff = function(newDiff)
end end
selectedDifficulty = newDiff; selectedDifficulty = newDiff;
irRequestStatus = 1;
irLeaderboard = {} irLeaderboard = {}
irRequestStatus = 1;
irRequestTimeout = 2 irRequestTimeout = 2
end; end;