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: Data Store questions!

Previous Thread :: Next Thread 
TomsGames is online. TomsGames
Joined: 11 Oct 2013
Total Posts: 1615
03 Mar 2014 08:29 AM
Right, I'm new to data stores and so I have a few questions the wiki page didn't quite answer or explain well enough.

There is a method which is "GetDataStore(name, scope)".

The name variable, must this have been set beforehand? If so how?

I mean, if I used GetDataStore("Test1") in one game, would this create a whole new data store for me called Test1?

If I went to another place could I access the Test1 datastore?

To make a new key within this datastore, would I use "SetAsync("ptz", 5)" to set the key "ptz" to the value of 5?
Report Abuse
Bebee2 is not online. Bebee2
Joined: 17 May 2009
Total Posts: 3985
03 Mar 2014 08:32 AM
No.
Technically no.
If it's the same place... I think. That's why I use global data store to save game to game.
Yes.
Report Abuse
TomsGames is online. TomsGames
Joined: 11 Oct 2013
Total Posts: 1615
03 Mar 2014 08:32 AM
In short, how do I SET UP a data store for myself and how do I set up keys inside?
Report Abuse
TomsGames is online. TomsGames
Joined: 11 Oct 2013
Total Posts: 1615
03 Mar 2014 08:35 AM
Ok so using game:GetService("DataStoreService"):GetDataStore("ContinuePressed") will load the ContinuePressed data store. If it doesn't exist, it will create one. Right? :S

So if I made that in Traffic Runner, could I then create another place and edit the data store in traffic runner through the second place?

How would I use SetAsync for the first time? So if someone joined I check if the key already exists, how would I go about doing that?
Report Abuse
Bebee2 is not online. Bebee2
Joined: 17 May 2009
Total Posts: 3985
03 Mar 2014 08:39 AM
I suggest

:GetGlobalDatastore()

If you want to edit game through game.
Report Abuse
Bebee2 is not online. Bebee2
Joined: 17 May 2009
Total Posts: 3985
03 Mar 2014 08:40 AM
Just check if the value of their set data store exists or not.
Report Abuse
TomsGames is online. TomsGames
Joined: 11 Oct 2013
Total Posts: 1615
03 Mar 2014 10:00 AM
Is a key a child of a datastore?

So..

If game:GetService("DataStoreService"):GetDataStore("Test1").ptz ~= nil then
Report Abuse
Bebee2 is not online. Bebee2
Joined: 17 May 2009
Total Posts: 3985
03 Mar 2014 10:03 AM
No, it's more of a website-like thing.
Report Abuse
TomsGames is online. TomsGames
Joined: 11 Oct 2013
Total Posts: 1615
03 Mar 2014 10:04 AM
.-.

So how do I check it's it exists?
Report Abuse
Bebee2 is not online. Bebee2
Joined: 17 May 2009
Total Posts: 3985
03 Mar 2014 10:06 AM
When you get the asyc inside, it should return nil.

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