well the thing is doing {} == {} will always be false.. the == operator checks to see if it's (table)operands are the same object, not wheather they have the same content..
so if i did, local a = {x = 10} and local b = {x = 10}, then print(a == b) will always print false..
however, if i did b = a then it print(a == b) will return true because the statement implies that a IS b..
to check whether or not 2 tables have the same content, you'd have to do something like the following.
function isSame(tableA, tableB)
for index, value in pairs(tableB) do
if(tableA[index] == value) then
return true
end
end
return true
end
but this might not work if the table passed to pairs has less items than the other table, and the items that it has match some of the few that the other one has
4 comments
If you do print(Table1) and print(Table2) it won't print the same in the output.
I can only think of a somewhat complicated loop to find out if your table's contents are the same. But I'm sure someone will give you a better answer
You are trying to print if the hexadecimal address is the same for the tables which isn't true you can create a nested loop though.
Wow... 3 answers... this is sad