How to pass userdata in c-api scoreboards callbacks

Looking at the Scoreboard spec Scoreboard API - Playdate Help

there doesn't seem to be a userdata param for any of the callbacks.

The PDScoresList type has a boardId property, which is enough of a discriminator to figure out which board the result is associated with.

PDScore does not have a boardId property though, so for these two callbacks, I have no clue for which board I just received / added a score.

typedef void (*AddScoreCallback) (PDScore *score, const char* errorMessage);
typedef void (*PersonalBestCallback) (PDScore *score, const char errorMessage);

I suppose I would have expected a userdata pointer here as is common with callbacks in C. (in general, and also with other callbacks in the C Playdate API)

let's say I call getPersonalBest() for two boards concurrently. How do I know for which board I received a result?

From some testing, it seems the callbacks are called in the order of requests, so if you store the callbacks in a FIFO (first in first out) list and take one callback from the list when a response comes in, that might work reliably on 2.6.0 beta5 at least

In Kuroobi, I made a callback by scoreboard to know which one has finished loading (but being able to receive a user data would be great).

playdate->scoreboards->getScores(kSakiBoardId, sakiScoresWasDownloaded);
playdate->scoreboards->getScores(kKatsuoBoardId, katsuoScoresWasDownloaded);

Thanks for the practical suggestion; however I'm looking at 30+ scoreboards. Also, since I'm programming in Nim, I'm not directly calling the playdate API but rather the Playdate-Nim API and that nim api will require some generic callback arg.

I also happen to be working on implementing Scoreboards in the Nim api, so I do have that flexibility at least.

I do similar in Lua for 6 score boards: a chain of callbacks.

so in the callback for the level1 result you create a request for level2, right? I vaguely remember you mentioning somewhere that sequential requests complete faster than parralel?

Exactly. In my experience the difference was pretty substantial. I've fine-tuned my method over the course of a few games and with Bender 2 it's as good as I can get it.