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: Datastore if statement

Previous Thread :: Next Thread 
AntiFiter is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
11 Apr 2015 03:50 PM
If I did

if ds:GetAsync("PlayedBefore") then

Would it be doing

1. Check if it's a true or false value (like a regular variable)
or
2. Check if it is nil (the player would only have this if they've played before)

and would I have to do == true if so?
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
11 Apr 2015 03:51 PM
if it's nil.

and it will not be true if it's nil.

obviously not.
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
11 Apr 2015 03:52 PM
but if it is a boolean value, that'd be interesting.

Report Abuse
AntiFiter is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
11 Apr 2015 03:57 PM
Another question

This will save as one:

local g = PlayerGui.G.Value

ds:SetAsync("B", {
-- One meelee-on values

})
-- Would only call datastore once (and saves faster?)

instead of

ds:SetAsync("B").G = g
ds:SetAsync("B").T = t
-- This would call datastore twice (using the throttle limit)

And then how to use GetAsync efficiently,
local Re = datastore:GetAsync("AllPlayerStatsEver")

Re.G = e
Re.D = a
-- Can infinitely use this, and it counts as one call correct?

Am I corrrect on these?
Report Abuse
AntiFiter is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
11 Apr 2015 04:20 PM
^^^

Questions of the century
Report Abuse
AntiFiter is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
11 Apr 2015 04:51 PM
The question of the century must be answered
Report Abuse
AntiFiter is not online. AntiFiter
Joined: 14 May 2009
Total Posts: 12290
11 Apr 2015 05:32 PM
Tough crowd today
Report Abuse
Tynezz is not online. Tynezz
Joined: 28 Apr 2014
Total Posts: 4945
11 Apr 2015 05:55 PM
function Check(statement)
if statement then return true else return false end
return false
end

Check( ds:GetAsync("PlayedBefore"))
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