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: Resetting data stores

Previous Thread :: Next Thread 
TheBenSquare is not online. TheBenSquare
Joined: 13 Dec 2009
Total Posts: 13604
30 Dec 2015 07:56 PM
Is it possible to reset an entire datastore without knowing the key for each entry within the datastore? (Moving the place to another place isn't an option.)
Report Abuse
BFFstick00 is not online. BFFstick00
Joined: 25 Oct 2010
Total Posts: 800
30 Dec 2015 07:57 PM
Try using nil
Report Abuse
TheBenSquare is not online. TheBenSquare
Joined: 13 Dec 2009
Total Posts: 13604
30 Dec 2015 07:57 PM
That'd require a key.
Report Abuse
ProtectedMethod is not online. ProtectedMethod
Joined: 01 Apr 2011
Total Posts: 5374
30 Dec 2015 07:59 PM
@BFF

You can't just simply set a datastore to nil


Neither is there a way to retrieve the keys in a datastore.

So sorry OP, roblox datastores are horrible which is why I had to write this gigantic php/mysql web api.
Report Abuse
rvox is not online. rvox
Joined: 18 Feb 2011
Total Posts: 5380
30 Dec 2015 07:59 PM
Just switch datastores

before:
local DS = service:GetDataStore("blah")

after:
local DS = service:GetDataStore("blah2")
Report Abuse
ProtectedMethod is not online. ProtectedMethod
Joined: 01 Apr 2011
Total Posts: 5374
30 Dec 2015 08:00 PM
@rvox

That isn't actually resetting anything....
Report Abuse
rvox is not online. rvox
Joined: 18 Feb 2011
Total Posts: 5380
30 Dec 2015 08:01 PM
But for all purposes it works
Report Abuse
UnstableScript0 is not online. UnstableScript0
Joined: 21 Dec 2015
Total Posts: 1189
30 Dec 2015 08:02 PM
@Protected

It actually is, and the added benefit is he can still recover old data.
Report Abuse
ProtectedMethod is not online. ProtectedMethod
Joined: 01 Apr 2011
Total Posts: 5374
30 Dec 2015 08:02 PM
@rvox

True, I've done that quite a few times.

Inefficient though.


Roblox just needs to up their game and make an actual DBMS
Report Abuse
DrHaximus is not online. DrHaximus
Joined: 22 Nov 2011
Total Posts: 8410
30 Dec 2015 08:07 PM
i wonder why there isn't more advanced methods of interacting with your datastores, the system in place is very primitive (atleast the interface is, anyways)
Report Abuse
TheBenSquare is not online. TheBenSquare
Joined: 13 Dec 2009
Total Posts: 13604
30 Dec 2015 08:09 PM
Normally, I would just change the name of the datastore, yeah. The thing is though, I reference that datastore plenty of times in a script and I'm trying to make the said script user-friendly so people don't have to know about datastores in order to use it correctly.

Well, that stinks that there's no methods to reset a data store. Hopefully ROBLOX will add some kind of function in the future to either retrieve all of the keys in a data store like :GetKeys() or a function to just immediately wipe it out like :ClearAllKeys().
Report Abuse
UnstableScript0 is not online. UnstableScript0
Joined: 21 Dec 2015
Total Posts: 1189
30 Dec 2015 08:10 PM
@TheBen

If you need to put the DataStore name in more than one place, you don't know basic efficiency. Just use a variable.
Report Abuse
Chrapnel is not online. Chrapnel
Joined: 01 Feb 2014
Total Posts: 951
30 Dec 2015 08:11 PM
DataStore = {}

?
Report Abuse
DrHaximus is not online. DrHaximus
Joined: 22 Nov 2011
Total Posts: 8410
30 Dec 2015 08:12 PM
@Ben

if it's a system for someone else, maybe you should generate the keys in a linear way so that the keys of the datastore can be discovered later.

kind of like how you would pop a stack
Report Abuse
TheBenSquare is not online. TheBenSquare
Joined: 13 Dec 2009
Total Posts: 13604
30 Dec 2015 08:52 PM
Just implemented that @Unstable, thanks for mentioning it. That should solve this issue I've been dealing with for now.

Anyways, I've created a thread in S&I to get some new features for the DataStores. Take a look if you'd like to do so. http://forum.roblox.com/Forum/ShowPost.aspx?PostID=180710928
Report Abuse
LongKillKreations is not online. LongKillKreations
Joined: 14 Feb 2014
Total Posts: 4502
30 Dec 2015 08:58 PM
S&I is pretty much a waste of time: all you'll get out of posting a suggestion there is a few idiots debating for weeks over some stupid detail. From what I know, suggesting something on the roblox developer forums is really the only way.
Report Abuse
TheBenSquare is not online. TheBenSquare
Joined: 13 Dec 2009
Total Posts: 13604
30 Dec 2015 09:02 PM
Oh well. I'll just message the idea to someone that's in RBXDev and hopefully they'll post something about it on the developer forums then.
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