Searching for a table in a table

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Searching for a table in a table

Snowhail
Hi,

I'm trying to search for a table int a table, but I'm not sure how do this. Here is what I have:

moveList = {}
table.insert(moveList,5);
table.insert(moveList, { 5,6 })

for _,v in pairs(moveList) do
        if v == {5,6} then
                print("yes");
        else
                print(v);//prints address of v and not the values
        end
end

Does anyone know how to do this properly ? thanks!