Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
3

Getting DataStore data without using OrderedDataStore [closed]

Asked by 11 years ago

How am I able to print all of that data inside of my datastore database without knowing the keys?

Every example I've seen uses OrderedDataStore, which isn't released yet.

Locked by Thewsomeguy, adark, and Articulating

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

1 answer

Log in to vote
1
Answered by
Merely 2122 Moderation Voter Community Moderator
11 years ago

Currently there is no way to get all of the keys within a datastore.

However, you can manage a list yourself by having a main key that consists of a table of all other keys. Whenever you create a new key, call UpdateAsync on the main key and add that new key to the table.

0
Thank you. Now that you mention it, I remember Unclear saying that he managed his player database this way. TheGuyWithAShortName 673 — 11y
0
Yeah, that's how I did it. Unclear 1776 — 11y
0
Wait, so how can I update the key's table without deleting all of the previous data? TheGuyWithAShortName 673 — 11y
0
Just update it like you regularly would with table[key], and update over the datastore. Unclear 1776 — 11y
Ad