I do not know what to call this so Im asking here
local table = {["Name"] = "john"}
print(table.Name)
how would I add another thing like name to this table
I do not know what to call this so Im asking here
local table = {["Name"] = "john"}
print(table.Name)
how would I add another thing like name to this table
asking once again for support ////
In this case, since you have a dictionary,
Let’s say you want to add an Age
of 16
to it, you’d do
table.Age = 16
-- Or
table["Age"] = 16
-- Or define it in the declaration
local tbl = {["Name"] = "john", ["Age"] = 16}
Though I recommend to not name it table
as table
is already a global for table functions
table.add
isn’t a valid table library function/field.
print(table.add) --nil
Adding on to this, even if it was a function, OP was using a Dictionary' and not a
Table/
Array`