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: Tables

Previous Thread :: Next Thread 
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
17 Apr 2013 08:33 PM
        local Admins = {
            Ranked = {
                {Name = "Cody", Rank = 5};
            }
        }

How would I access the part after:

        Admins.Ranked

?
Report Abuse
ScrewDeath is not online. ScrewDeath
Joined: 03 Jun 2012
Total Posts: 2700
17 Apr 2013 08:38 PM

print(Admins.Ranked[1].Name)
print(Admins.Ranked[2].Name)
Report Abuse
2unknown2 is not online. 2unknown2
Joined: 30 Oct 2011
Total Posts: 9351
17 Apr 2013 08:38 PM
for i,v in pairs(Admins[1]) do
end

if that doesnt work do this

for i,v in pairs(Admins[Ranked]

Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
17 Apr 2013 08:41 PM
Thanks!
Report Abuse
ScrewDeath is not online. ScrewDeath
Joined: 03 Jun 2012
Total Posts: 2700
17 Apr 2013 08:45 PM
np c:
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
17 Apr 2013 08:55 PM
And you'd insert something into it like this:

table.insert(Admins.Ranked, {Name = "Screw"; Rank = 4})

?
Report Abuse
ScrewDeath is not online. ScrewDeath
Joined: 03 Jun 2012
Total Posts: 2700
17 Apr 2013 08:58 PM
Yep. That's correct.
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