Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Ordered Datastore issue; Array not allowed in DataStore. Help?

I'm having issused with my ordered datastore. The error: Array is not allowed in DataStore. It's on line 3.

The script:

local DataStore = game:GetService("DataStoreService"):GetOrderedDataStore("Teststore1")

DataStore:SetAsync("32", {"1111", 11, "223"})

All help would be appreciated.

2 answers

✓ Accepted answer

I have just done some testing as I wanted for find this out as well. Though the API does specify a 'Variant' type, an OrderedDataStore will only accept an integer value. If you want to store a table you must use a GlobalDataStore.

Example save format:-

local DataStore = game:GetService("DataStoreService"):GetOrderedDataStore("test")

DataStore:SetAsync('test',  10)

I hope this helps.

Datastores do not support mixed tables, try

{"1111", "11", "223"}

instead for your table.

1 comment

0

Changing 11 to a string doesn't change anything. Still the same error.

This discussion is preserved as it was. New answers, comments, and votes are closed.