Posted 05 March 2016 - 11:09 PM
How can I copy a table without giving the reference?
For example:
My Problem:
I want do this with a metamethod __index = table.
I don't want to use a function, because I think, that decreasing the performance and I would get the same error.
I hope you can understand me.
Sewbacca
For example:
tab = {list = {}}
function setTable(t)
t = tab
end
My Problem:
s = {}
setTable(s)
print(tab == s) --> true, but I want false
I want do this with a metamethod __index = table.
I don't want to use a function, because I think, that decreasing the performance and I would get the same error.
I hope you can understand me.
Sewbacca
Edited on 05 March 2016 - 10:17 PM