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: Is ROBLOX undergoing a DataStore error?

Previous Thread :: Next Thread 
alphawolvess is not online. alphawolvess
Joined: 04 Jul 2012
Total Posts: 354
28 Nov 2015 10:15 PM
I have been notified a game I am helping develop is having saving problems today, which no one has manipulated the Script that controls Data saving. The error found in Developer Consul is basically saying " Dictionary cannot be saved to DataStore ". Is this a problem on ROBLOX behalf or possibly the scripting?
Report Abuse
LongKillKreations is not online. LongKillKreations
Joined: 14 Feb 2014
Total Posts: 4502
28 Nov 2015 10:17 PM
Make sure you're JSON encoding/decoding the dictionary?
Report Abuse
MakerModelLua is not online. MakerModelLua
Joined: 24 Feb 2013
Total Posts: 3544
28 Nov 2015 10:17 PM
Dictionaries cannot be stored in datastore(i wish it error that when i was using datastore)

Instead of:

local Table = {
["thing"] = 1;
["foo"] = 2;
}

print(Table.foo)

try:

local Table = {
1,
2
}

print(Table[2])
Report Abuse
LongKillKreations is not online. LongKillKreations
Joined: 14 Feb 2014
Total Posts: 4502
28 Nov 2015 10:31 PM
Correct me if I'm wrong but I'm certain you can save dictionaries to datastore if you convert it to JSON
Report Abuse
alphaboy299 is not online. alphaboy299
Joined: 15 Jun 2013
Total Posts: 1496
28 Nov 2015 10:35 PM
^I'm interested,how do you do that?
Report Abuse
LongKillKreations is not online. LongKillKreations
Joined: 14 Feb 2014
Total Posts: 4502
28 Nov 2015 10:37 PM
For encoding the dictionary:
http://wiki.roblox.com/index.php?title=API:Class/HttpService/JSONEncode

For decoding JSON:
http://wiki.roblox.com/index.php?title=API:Class/HttpService/JSONDecode
Report Abuse
alphaboy299 is not online. alphaboy299
Joined: 15 Jun 2013
Total Posts: 1496
28 Nov 2015 10:48 PM
Thanks.
Report Abuse
MakerModelLua is not online. MakerModelLua
Joined: 24 Feb 2013
Total Posts: 3544
28 Nov 2015 10:50 PM
I recommend not encoding to json if you don't need too. Takes up more resources, time, and roblox reorders it weirdly.
Report Abuse
LongKillKreations is not online. LongKillKreations
Joined: 14 Feb 2014
Total Posts: 4502
28 Nov 2015 10:54 PM
It takes up barely any resources, I don't understand how it takes up more time, and I've never had any problems with "weird reordering".
Report Abuse
alphawolvess is not online. alphawolvess
Joined: 04 Jul 2012
Total Posts: 354
28 Nov 2015 11:08 PM
Okay, thanks for the information. @everyone
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
28 Nov 2015 11:14 PM
hush dont listen to him

when you use datastores it automatically encodes/decodes

anyways whats your code

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
LongKillKreations is not online. LongKillKreations
Joined: 14 Feb 2014
Total Posts: 4502
28 Nov 2015 11:21 PM
"when you use datastores it automatically encodes/decodes"

Not if you're using dictionaries.
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
28 Nov 2015 11:22 PM
"Tables are saved in JSON" - http://wiki.roblox.com/index.php/Data_store

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
LongKillKreations is not online. LongKillKreations
Joined: 14 Feb 2014
Total Posts: 4502
28 Nov 2015 11:31 PM
If it automatically converted dictionaries to JSON strings, he obviously wouldn't be getting the error "Dictionary cannot be saved to DataStore".

I just tested it and saving to datastore with dictionaries works perfectly fine as long as you convert to JSON.
Report Abuse
LongKillKreations is not online. LongKillKreations
Joined: 14 Feb 2014
Total Posts: 4502
28 Nov 2015 11:35 PM
Hm - on second thought, that error is a bit vague. Does it mean that dictionaries can't be saved to datastores, or does it mean the dictionary he is specifically saving cannot be saved?

g
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
28 Nov 2015 11:44 PM
hes probably doing something like this

local table = {
"a",
["abc"] = "this wont work in datastores"
}

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
alphawolvess is not online. alphawolvess
Joined: 04 Jul 2012
Total Posts: 354
08 Dec 2015 05:06 PM
Problem already solved
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