I have a problem where I need to go through everyone’s data in my game so I can change their data to a new one even though they are not in the game. I came across the method ListKeysAsync()
. I have managed to get anyone’s key but I couldn’t reach out their data just like how datastore editor does. Is there a way to print out their data?
GetCurrentPage(): Gets the current page of keys.
GetAsync(): Fetches the data for each key.
AdvanceToNextPageAsync(): Moves to the next page if there are more keys.
You know you can access live datastores directly in Studio right?
Just make sure that you have API services enabled for Studio.
Also obviously, use the Command Bar for your code - or if you’re timid, write your code in a separate script, run your game, and delete the script afterwards.
Fair warning: this process is usually irreversible.
Caution is advised - you may want to back your data up before doing this.
Oh! that didn’t come to my mind then. Thanks for helping!
Correct me if I’m wrong, but will doing this, if done in game, overflow the datastore service if there are thousands/millions of keys (assuming the game gets popular), because you are making 1 get and 1 set datastore request for each player?
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.