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

Datastoring question [True or false]??

I didnt really understand the wiki..

I just would need a true or false statment, and maybe a example if you want to.. c:

--I use datastore for number value's and it work's fine but is Datastore able to save a string value?

#1, Is it possible to save a string with datastore?

1 answer

✓ Accepted answer

Yes, you can save strings using data stores. You can not save instances and mixed list tables.

Example:

local mixedListTable = {
	[1] = 3 -- The key is a number
	[2] = "A string"
	["A string"] = 5 -- The key is a string
	[4] = "Another string"
}

-- Because it has a key that is a string and another that is a number, you will get the error 'keys must be strings'

4 comments

0

So will {Player_ID=839839,Chat='wdidjiw'} work?

0

Yes, because it is not a mixed-list table but rather a map-style table

0

Ty! :D

0

Just make sure you set the key properly { [Player_ID] = 839839, [Chat] = 'wdidjiw'}

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