generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: "Cannot store array in DataStore"

Previous Thread :: Next Thread 
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
17 Apr 2016 10:11 AM
prntscr.com/atd0nv

What I'm trying to save ^ How can I get around this?
Report Abuse
direMitten is not online. direMitten
Joined: 18 Jun 2015
Total Posts: 1294
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
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
17 Apr 2016 10:14 AM
I was just reading that, so

dictionary?
Report Abuse
wi_sh is not online. 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
direMitten is not online. direMitten
Joined: 18 Jun 2015
Total Posts: 1294
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
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
17 Apr 2016 10:20 AM
"Cannot store dictionary in DataStore" .-.
Report Abuse
direMitten is not online. direMitten
Joined: 18 Jun 2015
Total Posts: 1294
17 Apr 2016 10:20 AM
lol okay idunno
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
17 Apr 2016 10:24 AM
aaaaaaaaaaaaaaa
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
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
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
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
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
17 Apr 2016 10:46 AM
b
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
17 Apr 2016 11:10 AM
bb
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
17 Apr 2016 11:29 AM
bbb
Report Abuse
earthyreuben is not online. earthyreuben
Joined: 17 Jan 2010
Total Posts: 669
17 Apr 2016 11:39 AM
It's possible, I've done it.
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
17 Apr 2016 11:41 AM
any advice
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
17 Apr 2016 02:49 PM
://////////
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
17 Apr 2016 03:36 PM
haaaalp
Report Abuse
chimmihc is not online. 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
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
17 Apr 2016 06:45 PM
No...what about BrickColorValues?
Report Abuse
Flux_Capacitor is not online. Flux_Capacitor
Joined: 07 Apr 2008
Total Posts: 45720
17 Apr 2016 06:51 PM
No you can't save any Roblox object.
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image