Description:
When attempting to make a SetAsync/UpdateAsync on a Global/OrderedDataStore, and you pass a string value / table that encodes to a string that is larger than ~260,000 characters, the error message has a misleading amount in the text rather than referring to the ~260,000 limit.
Repro:
- New file and publish it to a live place with Studio API access / live edit a place with Studio API access.
- Add a Script object to ServerScriptService.
- Set its contents to:
local ds = game:GetService("DataStoreService"):GetDataStore("_TEST")
ds:SetAsync("TEST", ("a"):rep(27e4)) -- larger than limit
- Press Play.
- Observe Output.
Observed Behavior:
This error message appears:
105: Serialized value converted byte size exceeds max size 64*1024 bytes.
However, this cannot be linked back to the ~260,000 character limit without knowing how Roblox serializes this value, how many characters fit in how many bytes (it is not to be expected most developers know this), and moreover the value reported in the error message just seems wrong.
Developers could be confused into thinking the limit is 64*1024 characters based on the error message.
Desired Behavior:
Desired error message:
105: Serialized value exceeds 260,000 character limit.