|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|