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: Whats the prupose on this?

Previous Thread :: Next Thread 
doneyes is not online. doneyes
Joined: 21 Mar 2008
Total Posts: 3466
21 Dec 2012 11:29 AM
I'm looking at tables on the wiki and I can't figure out something.


local myDictionary = {
["Roblox"] = "A massively multiplayer online game",
["Wiki"] = "A Web site developed collaboratively by a community of users",
["Lua"] = "A lightweight multi-paradigm programming language"
}



Why not just say

Roblox = "A massively multiplayer online game"



and what is the purpose of them saying myDictionary = { ?

is this so that they can say print(myDictionary) and then it prints all of that data? I feel very confused.
Report Abuse
Dex1337 is not online. Dex1337
Joined: 01 Aug 2012
Total Posts: 185
21 Dec 2012 11:31 AM
You use it in a form of

for i, v pairs do(myDictionary)

and you add the rest, its supposed to hold info instead of typing it all out. Easier
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
21 Dec 2012 11:33 AM
It creates a table of data. Dex1337 is right about how to print it, though.
Report Abuse
doneyes is not online. doneyes
Joined: 21 Mar 2008
Total Posts: 3466
21 Dec 2012 11:38 AM
So to put it into context, what is a way I could use it in a game?
Report Abuse
FreeToTake is not online. FreeToTake
Joined: 21 Apr 2010
Total Posts: 1827
21 Dec 2012 11:40 AM
if you want it to give a message, use an array.

x = Instance.new("Hint", workspace)
x.Text = ""
texts = {"Hi", "Welcome", "Be nice"}

while wait() do
for i = 1,#texts do
x.Text = texts[i]
wait(2.5)
end
end
Report Abuse
CloneTrooper1019 is not online. CloneTrooper1019
Joined: 19 Jan 2009
Total Posts: 6227
21 Dec 2012 11:41 AM
In my case, I use it for labeling data in a table

For example

local maps = {
[1] = game.Lighting.Map1;
[2] = game.Lighting.Map2;
[3] = game.Lighting.Map3
}
Report Abuse
doneyes is not online. doneyes
Joined: 21 Mar 2008
Total Posts: 3466
21 Dec 2012 11:58 AM
Oh okay. So it simplifies your script. You could get around not doing it if you wanted to, but for more complex things, this would be an easy way to go. Thanks
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