G
G
Gigabait2017-04-20 15:57:14
Lua
Gigabait, 2017-04-20 15:57:14

How to refer to a value in a table?

I have a table like this:
local table = {
["1 tab"] = "blah 1",
["2 tab"] = "blah 2",
user = {
["1 use"] = "blah 1",
["2 use"] = "blah 2"
}
}
How can I access the values ​​in the user table which is in the table table?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Lerg, 2017-04-20
@Lerg

Don't call tables table, it's a keyword. In general, table.user["1 use"] == "blah 1"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question