I think I know what is happening, just not how to get the results I want instead.
Here’s some stripped down sample code:
a = {1,2}
print(table.concat(a,",")) --\>\> 1,2
b = a
print(table.concat(b,",")) --\>\>1,2
b[1] = 3
print(table.concat(b,",")) --\>\>3,2
print(table.concat(a,","))--\>\>3,2
So I (now) get that when I create “b”, it actually a reference to a, so that when I change b, I change a as well. What I want to do is create a new table “b”, with the same values of table “a”, but after the creation I want to manipulate them independent of each other. So in the above sample, “a” would stay “1,2” and only “b” would become “3,2”.
I know this is a simple fix, but I admit, I’m stumped. [import]uid: 64596 topic_id: 19217 reply_id: 319217[/import]