Hello, I've been recently accepted for the Catalogue, meaning that I now have access to the leaderboard system but I get a strange bug in this code :
function OpenLeaderboard()
local function FetchingPersonnalBest(status, result)
print(status.code)
scoreboardPersonnal = result
scoreboardFetched = true
end
local function FetchHighscores(status, result)
print(status.code)
scoreboardList = result
playdate.scoreboards.getPersonalBest("highscores", FetchingPersonnalBest)
end
local function AddHighscores(status, result)
print(status.code)
playdate.scoreboards.getScores("highscores", FetchHighscores)
end
stateMenu = "leaderboard"
if not scoreboardFetched then
playdate.scoreboards.addScore("highscores", 50, AddHighscores)
end
end
All tree prints says "OK", "playdate.scoreboards.getPersonalBest" works fine and when I print it's result I get what I send in "playdate.scoreboards.addScore", but when I use "playdate.scoreboards.getScores" it return nothing and the list is empty
Shouldn't I at least get the result of my personnal best ? Is there something I'm missing here ?