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 » Scripting Helpers
Home Search
 

Re: Plugin Data not Saving?

Previous Thread :: Next Thread 
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
21 Feb 2014 05:13 PM
local DataStoreLib = plugin:GetSetting("DATASTORES")



This ALWAYS returns an empty table for me. I populate it later in the script like this:



print "Creating new ID!"
rawset(DataStoreLib, pid, {})
plugin:SetSetting("DATASTORES", DataStoreLib)



Where 'pid' is a string retrieved from a TextBox's Text property.
Am I doing something wrong? D:
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
21 Feb 2014 05:21 PM
UPDATE: It does appear to be saving, as there is a settings file. Here is the contents of the settings file after saving the value '2975058' as a key with value {}:



{ "DATASTORES":{ "2975058":[ ] }}



Do I need to use some JSON stuff to convert THAT into a table?
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
21 Feb 2014 05:33 PM
New update.


{ "DATASTORES":{ "147152161":[ ], "2975058":[ ] }}


print(DataStoreLib["2975058"])
--> nil


???
I have no clue what I'm doing wrong. X_X
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
21 Feb 2014 05:37 PM
Last update.

It appears you cannot save a table inside of a table. If anybody can figure this out, please let me know, as it would be extremely efficient than the alternative I'm going to conjure up.
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
21 Feb 2014 05:43 PM
False alarm.

You cannot store an EMPTY table within another table while using SetSetting in a plugin. Apologies all for bothering you with the spam.

My problem has been resolved.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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