jav2612
|
  |
| Joined: 14 Jun 2010 |
| Total Posts: 1189 |
|
|
| 11 May 2014 08:49 PM |
Apparently every time you save something to a player, it adds to the datacomplexity instead of just overwriting the old data.... This is becoming a problem for me because I'm saving a fairly large amount of data, and if it gets saved too many times the player's DataComplexity reaches the limit and stops working.
I tried saving over the data before I save it every time with something like this: player:SaveInstance("key", Instance.new("BoolValue"))
but that apparently doesn't clear the player's DataComplexity.
Is there a way to wipe it clean before I save every time? |
|
|
| Report Abuse |
|
|
jav2612
|
  |
| Joined: 14 Jun 2010 |
| Total Posts: 1189 |
|
|
| 11 May 2014 08:52 PM |
Also I tried player:SaveInstance("key", nil) but it gave me an error saying I can't do that... which is weird because the wiki says "Saving the default value (0 for numbers, false for booleans, "" for strings and nil for Instances) removes the key from the DataComplexity count."
Maybe I'm not doing it properly? If so how are you supposed to do it. |
|
|
| Report Abuse |
|
|
| |
|
jav2612
|
  |
| Joined: 14 Jun 2010 |
| Total Posts: 1189 |
|
|
| 11 May 2014 08:56 PM |
| I would prefer to use datapersistance but if nothing else works I'll have to change everything to datastore. |
|
|
| Report Abuse |
|
|
jav2612
|
  |
| Joined: 14 Jun 2010 |
| Total Posts: 1189 |
|
|
| 13 May 2014 03:23 PM |
| I need to be able to save an instance. Apparently you can't save an instance on DataStore because it says "Data contains object that can't be stored" |
|
|
| Report Abuse |
|
|
|
| 13 May 2014 03:24 PM |
| Im not sure what youre asking, if it's deleting current data, change the key. |
|
|
| Report Abuse |
|
|
jav2612
|
  |
| Joined: 14 Jun 2010 |
| Total Posts: 1189 |
|
|
| 13 May 2014 03:26 PM |
The problem is players are reaching their DataComplexityLimit after a few saved because when you save data it doesn't overwrite, it just adds onto the Data Complexity.
I can't just change the key everytime I save/load something to a player, and that wouldn't help anyway because changing the key won't reduce the player's Data Complexity. It will still be the same. |
|
|
| Report Abuse |
|
|
yurhomi10
|
  |
| Joined: 10 Dec 2008 |
| Total Posts: 13886 |
|
| |
|
jav2612
|
  |
| Joined: 14 Jun 2010 |
| Total Posts: 1189 |
|
|
| 13 May 2014 03:31 PM |
| If I were to save every value individually in the instance I would have to save 50+ boolvalues and at least 20 number values... You can see why that isn't preferable. |
|
|
| Report Abuse |
|
|
jav2612
|
  |
| Joined: 14 Jun 2010 |
| Total Posts: 1189 |
|
|
| 13 May 2014 03:32 PM |
| Did you read my post about how DataStore can't save instances? I need to be able to save a whole instance. |
|
|
| Report Abuse |
|
|
yurhomi10
|
  |
| Joined: 10 Dec 2008 |
| Total Posts: 13886 |
|
|
| 13 May 2014 03:33 PM |
| Yes, well idk. Never really worked with datapersistance since its slowly depreciating. |
|
|
| Report Abuse |
|
|
jav2612
|
  |
| Joined: 14 Jun 2010 |
| Total Posts: 1189 |
|
|
| 13 May 2014 03:57 PM |
The wiki specifically says "Saving the default value (0 for numbers, false for booleans, "" for strings and nil for Instances) removes the key from the DataComplexity count." here: http://wiki.roblox.com/index.php?title=DataComplexity_(Property)
and yet when I try player:SaveInstance("key", nil) I get an error "Cannot save a null instance" or something like that. |
|
|
| Report Abuse |
|
|