String array issue

Hi,

I have a series of arrays in an array:

var allwinning = new Array(["000", "001", "002"], ["000", "010", "020"], ["000", "011", "022"], ["000", "100", "200"]);

and I have another array that keep player’s choice:

var playpicks = new Array("000", "001", "002");

The game require me to match playpick with any of the allwinning to win. But when I test

var playpicks2 = allwinning[0];
if(playpicks==playpicks2)
{
print("yes they are matched");
}
else
{
print("No No No!");
}

I always get a"No No No!". How can I resolve this? Thanks!

Replace comparation with function that will compare each value with each other:

if( Compare(playpicks,playpicks2) )
{
print("yes they are matched");
}
else
{
print("No No No!");
}

function Compare(playpicks: Array, playpicks2 : Array) : boolean
{
...
}