View Single Post
Unread 02-23-13, 04:08 PM   #4
Haleth
This Space For Rent
 
Haleth's Avatar
WoWInterface Super Mod
Featured
Join Date: Sep 2008
Posts: 1,172
I use the following function to copy a table by value:

Code:
local function copyTable(source, target)
	for key, value in pairs(source) do
		if type(value) == "table" then
			target[key] = {}
			copyTable(value, target[key])
		else
			target[key] = value
		end
	end
end
Haleth is offline   Reply With Quote