|
| 17 Apr 2016 10:11 AM |
prntscr.com/atd0nv
What I'm trying to save ^ How can I get around this?
|
|
|
| Report Abuse |
|
|
|
| 17 Apr 2016 10:14 AM |
| http://wiki.roblox.com/index.php?title=Data_store#Tables_with_mixed_list_.2F_record_style_will_be_cut_off |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2016 10:14 AM |
I was just reading that, so
dictionary?
|
|
|
| Report Abuse |
|
|
wi_sh
|
  |
| Joined: 26 Feb 2016 |
| Total Posts: 156 |
|
|
| 17 Apr 2016 10:16 AM |
local tab = { ["Hair"] = Hair.Value, ["HairColor"] = Hair.Value, }
structure your table like this |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2016 10:18 AM |
I guess you could do something like this:
unarrayize(t) for i, v in pairs(t) do if type(i) == "number" then table.remove(t, i) t[tostring(i)] = v end end end |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2016 10:20 AM |
"Cannot store dictionary in DataStore" .-.
|
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 17 Apr 2016 10:29 AM |
for i,leaderstat in pairs(StatFile:WaitForChild(player.Name):WaitForChild("CharAppearance"):GetChildren()) do dataInformation[leaderstat.Name] = leaderstat.Value --table.insert(dataInformation,#dataInformation + 1, leaderstat.Name) --table.insert(dataInformation,#dataInformation + 1, leaderstat.Value) end
aaaaaaaa?
|
|
|
| Report Abuse |
|
|
|
| 17 Apr 2016 10:30 AM |
um full function
local function saveValues(player) local dataInformation = {} for i,leaderstat in pairs(StatFile:WaitForChild(player.Name):WaitForChild("CharAppearance"):GetChildren()) do dataInformation[leaderstat.Name] = leaderstat.Value --table.insert(dataInformation,#dataInformation + 1, leaderstat.Name) --table.insert(dataInformation,#dataInformation + 1, leaderstat.Value) end dataStoreService:SetAsync(player.userId,dataInformation) end
|
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 17 Apr 2016 11:39 AM |
| It's possible, I've done it. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 17 Apr 2016 03:46 PM |
Are there any non-primitive stats? Booleans, numbers, and strings will work fine however you cannot save userdata, functions, or threads(coroutines).
|
|
|
| Report Abuse |
|
|
|
| 17 Apr 2016 06:45 PM |
No...what about BrickColorValues?
|
|
|
| Report Abuse |
|
|
|
| 17 Apr 2016 06:51 PM |
| No you can't save any Roblox object. |
|
|
| Report Abuse |
|
|
|
| 17 Apr 2016 06:54 PM |
Ugh, I thought because it was a type of Value that I'd be able to save it. Good to know.
|
|
|
| Report Abuse |
|
|