Platform: Mac
I'm implementing a high score in my game and I see the API call for add score:
playdate.scoreboards.addScore(boardName, value, callback)
Here is what my board looks like for reference:
{
[boards] = {
{
[boardID] = leaderboard,
[name] = Speedrun Leaderboard,
},
},
[lastUpdated] = 762169436,
}
When using the board name as the first argument to the addScore API call (in my case "Speedrun Leaderboard"), this returns an error.
However, when using the BoardID ("leaderboard") this works without any issues.
playdate.scoreboards.addScore("leaderboard", game_time, <callbackfunction>)
{
[code] = OK,
}
Result:
{
[player] = Drew-Lo,
[rank] = 1,
[value] = 3355550,
}
I believe the documentation should be updated to use "boardID" as the first argument.