Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return previous leaderbaord record on nk.LeaderboardRecordWrite #999

Open
Ordynsky-DeusCraft opened this issue Mar 17, 2023 · 1 comment

Comments

@Ordynsky-DeusCraft
Copy link

Ordynsky-DeusCraft commented Mar 17, 2023

Hello! This issue is not a bug, but I would like to offer some improvement for the nakama runtime.
It would be great if nk.LeaderboardRecordWrite returned a previous record, that was before current operation.
It would be useful in the caces when a user needs to Undo some operations.
For example, if I have two dependent leaderboards

  1. all users leaderboard
  2. the groups leaderboard, where the results of all users leaderboard are grouped by their groups

If some user reports a score:
On the first step, I need to write a record to the all users leaderboard
Then, on the second step, I need to update the groups leaderboard.
But if I have some error on the second step - it would be great to undo the first step operation and return the error.
If I have the LeaderboardRecord of the first leaderboard before the first step - it allows me to undo this operation easily. Now I need to call nk.LeaderboardRecordsList before the first step. Thanks!

@Ordynsky-DeusCraft
Copy link
Author

I have thought and I assume that such an action can reduce performance for users that don't need this value. If so - just close this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant