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

Getting every key in a datastore?

Asked by 7 years ago

Is it possible without Ordered datastores? I need to use strings, so I can't use them.

0
You cannot get a list of keys that the data store uses. An ordered data store does not know the key it knows that the data is in a set order and can return this data. User#5423 17 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

No, but you can use OrderedDataStores to (help) store strings: - Remember that the key can be up to 50 characters long - If the string is small enough, you can convert the string into a number (though you have to write this algorithm yourself). - If you know all the possible strings when scripting, you could assign each string a number and store that intead - You could also store a number that refers to a specific non-ordered DataStore key that stores the actual string

Ad

Answer this question