Answers for "how to make a table in lua"

Lua
3

lua tables

local Table = {
	["TABLE_info"] = "TABLE_response"
}

for i, v in pairs(Table) do
	print(v)
end
Posted by: Guest on January-08-2021
2

lua tables

local favoritefoods_table = {"hamburger", "spaghetti", "pizza", "potato chips"}
--the table--

for i, v in pairs(favoritefoods_table) do --loop through the table-- 
	print(i) --print the number--
  	print(v) --print the value--
end
Posted by: Guest on October-16-2020
1

table in lua

local myTable = {}
Posted by: Guest on September-05-2020
1

how to make a table in lua

--You need to use this {} and put them in a varible
local Table = {13,"1hihihi",
-- u can even do tis
{122,222}}
Posted by: Guest on April-05-2020
1

table lua

a = {}
    x = "y"
    a[x] = 10                 -- put 10 in field "y"
    print(a[x])   --> 10      -- value of field "y"
    print(a.x)    --> nil     -- value of field "x" (undefined)
    print(a.y)    --> 10      -- value of field "y"
Posted by: Guest on March-07-2020
1

lua create table

var = {}
Posted by: Guest on March-22-2020

Browse Popular Code Answers by Language