Can anyone offer an alternative to removing duplicates from an numeric indexed
table that will keep a record of the duplicate?, this one works but on tables of
1000 or more entries it just seems to eat the cpu that in turn gives “not responding”
in the app lua is embedded in.
local Dupes ={} local t2 = {}; for i,v in pairs(t1) do Count = table.getn(t2) t2[v] = i Count1 = table.getn(t2) if Count == Count1 then table.insert(Dupes,v) end end
I don’t really see the purpose of the use of
getn. Just test to see if it’s already there: