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

Previous Thread :: Next Thread 
doctor152 is not online. doctor152
Joined: 30 Nov 2008
Total Posts: 308
15 Feb 2016 03:56 PM
So I've recently encountered an issue which I never used to have. I would put tables within tables like so:

TestTable = {
t1 = {"test"}
t2 = {"test2"}
}

And I would do this:

print(TestTable[1][1])

But recently it has returned a nil value and I'm unsure why. I have tried using metatables and it sort of fixes it but all it does it use the first table. I'm unsure whether it's always been like this and would like to know how to fix it. Thanks.


Report Abuse
62GB is not online. 62GB
Joined: 03 Oct 2011
Total Posts: 4157
15 Feb 2016 03:57 PM
TestTable.t1[1]



Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
15 Feb 2016 03:59 PM
TestTable[1] is nil. Try TestTable["t1"][1]


Report Abuse
doctor152 is not online. doctor152
Joined: 30 Nov 2008
Total Posts: 308
15 Feb 2016 04:00 PM
Ah I didn't notice, thank you both.


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