So close.Ranguna259 wrote:OOH now I see what he wants (maybe)
I write decision before (at screenshot).
I have tables (example):
Code: Select all
SomeTable = {}
SomeTable_1 = {}
SomeTable_2 = {}
Code: Select all
MoreSomeTable = {}
MoreSomeTable[1] = {name = "SomeTable"}
MoreSomeTable[2] = {name = "SomeTable_1"}
MoreSomeTable[3] = {name = "SomeTable_2}"
See? ))
Next: Assume that I have add in table value as i clicked. (Example)
Code: Select all
function love.mousepressed(x, y, button)
if button == "l" then
for i,v in ipairs (MoreSomeTable) do
table.insert (v.name, 1)
end
end
end
But i can create not 3 tables SomeTable... but create table SomeTable = {} and 3 tables in this table:
Code: Select all
SomeTable = {}
SomeTable.SomeTable = {}
SomeTable.SomeTable_1 = {}
SomeTable.SomeTable_2 = {}
Code: Select all
function love.mousepressed(x, y, button)
if button == "l" then
for i,v in ipairs (MoreSomeTable) do
table.insert (MoreSomeTable[v.name], 1)
end
end
end
Clearly explained?
Again sorry for my english. ^_^