table.insert position
Posted: Sun Mar 06, 2011 10:51 am
I want a function which adds a key (a string!) and value to a table.
Something like:
function addnewguy(nickname,name)
table.insert(guys,nickname,name)
end
Except the above doesn't seem to work.
The "pos" in table.insert (table, [pos,] value) has to be a number value i guess.
Is there another way I can do it?
Something like:
function addnewguy(nickname,name)
table.insert(guys,nickname,name)
end
Except the above doesn't seem to work.
The "pos" in table.insert (table, [pos,] value) has to be a number value i guess.
Is there another way I can do it?