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: Loading multiple strings (DataStore)

Previous Thread :: Next Thread 
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
01 Feb 2015 12:40 PM
so I have a datastore that uses multiple strings

I am using a for loop to load the values of each particular string, is this incorrect? This method is loading all of the strings to the same value, so it's like

>one value is set to true, game saves it

>loads all of the values to that one value, so every single one is set to true

How should I go about saving multiple values under one datastore? And indexing that particular value based on the name?
Report Abuse
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
01 Feb 2015 12:40 PM
Title should have been "loading multiple bools", I am dealing with bools
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
01 Feb 2015 12:44 PM
Values = {["Val1"]=true, ["Val2"]=false, ["Val3"]=false}
Report Abuse
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
01 Feb 2015 12:48 PM
what do you mean
Report Abuse
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
01 Feb 2015 03:29 PM
b
Report Abuse
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
01 Feb 2015 05:36 PM
b
Report Abuse
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
01 Feb 2015 11:50 PM
b
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
01 Feb 2015 11:55 PM
he means using a table
Report Abuse
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
02 Feb 2015 05:51 AM
but what do I do with the table in terms of the datastore
Report Abuse
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
02 Feb 2015 06:06 AM
do you mean set a save in the datastore for each table member and then iterate through the table for every match found in the datestore?
Report Abuse
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
02 Feb 2015 06:56 AM
bump
Report Abuse
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
02 Feb 2015 07:16 AM
b
Report Abuse
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
02 Feb 2015 07:37 AM
b
Report Abuse
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
02 Feb 2015 07:57 AM
b
Report Abuse
daireb is not online. daireb
Joined: 16 Nov 2012
Total Posts: 726
02 Feb 2015 08:30 AM
database = game:GetService("DataStoreService"):GetDataStore("MainStorage")

local strings = {var1="Hello",var2="World"}

database:SetAsync(strings, "Strings")

print(database:GetAsync("Strings")[var1].." "..database:GetAsync("Strings")[var2])

If you need books then just replace the strings with bools, easy!
Report Abuse
Tripane is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
02 Feb 2015 06:26 PM
I don't understand the whole ("Strings") thing, it was never a variable?

How does this answer my question? Do I have to go through every member of the table? I can't loop through them? oooohhhh confusion
Report Abuse
daireb is not online. daireb
Joined: 16 Nov 2012
Total Posts: 726
03 Feb 2015 03:37 AM
When you set a Database, you need to give it an ID, which is the "Strings", it's like the name of a variable.
Every data store entry needs a value (the table of strings) and an ID("Strings"), so you can access it again
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