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

104: Cannot store Dictionary in data store. Data stores can only accept valid UTF-8 characters?

Asked by 5 years ago

I'm creating a placement system where the position of the object being placed is the key and then data about it must also be stored.

local keyedData = {}

local Key = tostring(XPos..","..ZPos..",".. Data.Rotation)

keyedData[Key] = {placingObject, 1} --{object name, level}

table.insert(plrData["Objects"], keyedData[Key]) --plrData["Objects"] is the data being saved

But I'm getting an error as displayed in the question, I'm assuming that the data I'm attempting to save is not supported, is there a way where I can create a key (made up of using the positions and rotations) for a table and the data inside said table is the object name as well as the level.

It would in essence look like this, but of course wouldn't be visible like this:

plrData["Objects"] = {
    ["1,3,90"] = {"Turret", 5}
}
0
You’re correct datastores will only accept UTF8 strings and numbers so I’d think you’d have to make another table to hold all the object positions? ABK2017 406 — 5y

Answer this question