Datastore is confusing me

Hello! And I am having trouble with Datastore. I have a couple of questions about it.

When you save the value’s parent does it save the value also?
What is the maximum Datastore value?
What does pcall do?

Please respond!

Hello!

  1. Data Stores can save only value types (Strings, Objects, Integers and so on). This means that you need to save every sing value you want specifically instead of listing a parent of all the values.

  2. You can read about limits on data stores here. Essentially they are quite prone to errors. Limits include how long a data store key is, how many data variables you can have and the amount of characters you can have.

  3. Pcalls are used to handle errors, they allow a script to know is something like a save or load failed. This allows the script to re-try the action later on and alert the user.

Thanks for responding! It helped.

local file = nil --please note that further up in this script a data store was declared.
	
local returned, data = pcall(function() --using this function won't cause the script to stop
file = DS:GetAsync(plr.UserId)
end)
	
if returned == false then -- this variable will be false if there is an error
--handle your error here
end

Here is an example of a pcall

Oh. Ok! I know what you meaned.

?? What do you mean? I don’t get it.

What exactly is confusing you?

Nevermind. I was just looking into Datastore2. It is very advanced and better.