Jump to content

teamTable question


Bean666

Recommended Posts

check this:

--Example 1: 
  
local teams = { 
  ["Team1"] = teamName1; 
  ["Team2"] = teamName2; 
} 
  
-- then you can use this to get the team from name 
local theTeam = getTeamFromName(teams["Team1"]) 
  
-- Example 2 
local teams = { 
  team1 = teamName1; 
  team2 = teamName2; 
} 
  
-- and you can use this to get the team from name 
local theTeam = getTeamFromName(teams.team1) 

Link to comment

That sets up the table.

Table = {} -- Creates an empty table 
  
Table[1] = "Test" -- Assigns a value to the table 
  
function test () 
local tablea = Table[2] -- Turns value #2 into a local table 
local tablea[1] = "test" -- Assigns a value to the table 
local tableb = tablea[1] -- Deeper table.  
  
--- And so on  

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...