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

Can we use player IDs instead of a player object? #162

Closed
MiguelEXE opened this issue Nov 25, 2022 · 1 comment
Closed

Can we use player IDs instead of a player object? #162

MiguelEXE opened this issue Nov 25, 2022 · 1 comment

Comments

@MiguelEXE
Copy link

I'm writing a economy system in my game, where if the player is not online, it still can receives a transaction from another player, but when i read the documentation, i found that i need a player object to use the datastore system. But if the player is offline, the transaction can't be made, so, can we use a player ID instead of a player object?

@Kampfkarren
Copy link
Owner

There's an open issue for user IDs, but read only. The problem is it's not safe. DataStore2 caches, and so multiple separate instances can end up clashing different data against each other.

I wrote about this problem in detail in this blog post about a separate library I'm on-and-off-writing: https://blog.boyned.com/articles/committing-to-safety-in-data-stores/

@Kampfkarren Kampfkarren closed this as not planned Won't fix, can't repro, duplicate, stale Nov 25, 2022
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

2 participants