@Raxis-legacy (Raxis) posted a new topic, subject "Comparing 2 tables.". It read:

   I need to compare 2 tables and have it return the values that aren't the same.
    
    Ex:  
    table1 = {a, b , c}  
    table2 = {a, b, c, d}
    
    It will return d or at least find it.

@_nonSENSE-legacy (_nonSENSE) replied

    [lua]  
    function compareTables(t1, t2)  
    local v = {}
    [code] 
        for _, i in pairs(t1) do
        	if not table.HasValue(t2, i) then
        		table.insert(v, i)
        	end
        end
        
        for _, i in pairs(t2) do
        	if not table.HasValue(t1, i) then
        		table.insert(v, i)
        	end
        end
        
        return v	
        
    [/code]
    
    end  
    [/lua]
    
    Something I wrote in 2 minutes, should work.
    
    [lua]  
    table1 = {a, b, c}  
    table2 = {a, b, c, d}
    
    local missingValues = compareTables(table1, table2)  
    [/lua]


{'source': 'discourse', 'url': 'https://forum.facepunch.com/t/comparing-2-tables/68293', 'title': 'Comparing 2 tables.', 'views': 410, 'has_accepted_answer': False, 'word_count': 111, 'like_count': 0, 'reply_count': 1, 'participant_count': 2, 'posts': 2, 'tags': '', 'author': '@Raxis-legacy (Raxis)', 'participants': '@Raxis-legacy (Raxis), @_nonSENSE-legacy (_nonSENSE)', 'image_url': [None], 'created_at': '2010-09-27T01:26:45.000Z', 'last_posted_at': '2010-09-27T01:55:02.000Z'}