Thread: I hate lua.
View Single Post
11-04-05, 09:40 PM   #7
shouryuu
A Chromatic Dragonspawn
 
shouryuu's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2005
Posts: 150
It's simple enough I want to inverse a table's keys and values. I want the keys to become the values, and the values to become the keys.

Would something along these lines work?
Code:
function SetTicketNumberToNil()
	for k,v pairs do
		table.insert(name, name[i], i)
	end
end
This only work, if it does, because the keys are simple: 1,2,3,4,5... But how do I do that if I have keys like zdfs and gkfslg; or djakf?

Last edited by shouryuu : 11-04-05 at 09:43 PM.
  Reply With Quote