There's a table with strings in it. For every time the script runs through one string of PurchasedEmotes, it will check if there are any duplicate purchases. The problem lies in Line 12, table.remove(PurchasedEmotes,PurchasedEmotes[i]) where the script says bad argument #2 (number expected, got string) when the whole table is strings only. And I have listed which number of PurchasedEmotes to get rid of, being [i] Can someone help me out?
for i = 1,#PurchasedEmotes do
print(PurchasedEmotes[i])
if #FindDupesTable == 0 then
table.insert(FindDupesTable,PurchasedEmotes[i])
print("first one")
end
for n = 1,#FindDupesTable do
if PurchasedEmotes[i] == FindDupesTable[n] then
table.remove(PurchasedEmotes,PurchasedEmotes[i])--???
print("found a duplicate.")
else
table.insert(FindDupesTable,PurchasedEmotes[i])
print("not a dupe")
end
end
end

2 comments
Thanks!
Np glad to help!