Announcement

Collapse
No announcement yet.

How to find duplicates in a table with subtables?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to find duplicates in a table with subtables?

    Hi. I created a table with subtables containing filenames. Is there a fast/easy way to check if any subtable has the same file as another subtable in it?
    It should check if any mod uses the same files to warn the user that modx and mody modify the same file and that it could cause problems.

    It looks like this

    MyTable
    -->Modname1
    ------>File1
    ------>File2
    ------>File3
    ------>File4
    -->Modname2
    ------>File1
    ------>File5
    ------>File6
    -->Modname3
    ------>File1
    ------>File2
    ------>File7
    ------>File9

    Now it should check if File1 is in any other table (Modname1-3).


    I tried some nested for i,v in pairs(MyTable) do loops but it did not work well so far. Any ideas how to do this?
    Bl4ckSh33p-Soft - Custom Software and Indie Games
Working...
X