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: How to simulate having access to a data base in test mode

Previous Thread :: Next Thread 
WolfgangVonPrinz is not online. WolfgangVonPrinz
Joined: 24 Oct 2013
Total Posts: 4656
03 May 2016 05:26 AM
Because not being able to is stupid


WolfgangVonPrinz for President!
Report Abuse
RightLegRed is not online. RightLegRed
Joined: 02 Oct 2009
Total Posts: 6761
03 May 2016 05:59 AM
Do you mean like:

http://wiki.roblox.com/index.php?title=Data_persistence


If so, you could create your own skeleton persistence based on this very easily but obviously, the call would not be similiar. You could possibly actually create a modulescript for all your persistence which checks the current mode of the game (i.e. is in studio, etc.)

Example, and untested and written in the forum textbox (so ignore errors) would be like:

local p = {}

function PersistPlayerValue(player, valueName, value)
local didDatastore = false
if player.DataReady then
// actual persistence stuff here
didDatastore = true
end
if(p[player] == nil) then
p[player] = {}
end
p[player][valueName] = value
return didDatastore
end


Which would store data locally if datastore exists and if it did not, so you could probably use the local version of data online anyway because it should be the most up to date.
Report Abuse
WoolHat is not online. WoolHat
Joined: 19 May 2013
Total Posts: 1873
03 May 2016 06:23 AM
If I recall correctly, I've had data persistence work in test mode. Just had to enable the API
Report Abuse
scottmike0 is not online. scottmike0
Joined: 14 Sep 2008
Total Posts: 1073
03 May 2016 06:24 AM
data stores > data persistence.
mate, you can see the dev console when you are in a server to see all the code being ran.
use print statements to see the results.
Report Abuse
WolfgangVonPrinz is not online. WolfgangVonPrinz
Joined: 24 Oct 2013
Total Posts: 4656
03 May 2016 07:15 AM
I mean Data Stores.

Also, no I want to see lots of folders inside the player and check the value of what they hold


WolfgangVonPrinz for President!
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
03 May 2016 07:23 AM
You can use datastores from in studio after you enable the studio API thing from the game settings.

You can use the IsStudio method of RunService to check if it is in studio and change the behavior, like using a different datastore so it doesn't affect the real game datastore.

http://wiki.roblox.com/index.php?title=API:Class/RunService/IsStudio


Report Abuse
WoolHat is not online. WoolHat
Joined: 19 May 2013
Total Posts: 1873
03 May 2016 06:13 PM
^

Yeah, that's what I was trying to say. I also always get the names of datastore and datapersistence mixed up
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