function table_print(t) { if(t==nil) log("Table do not exist!") else { foreach(t, function(key, value) { log(key, " -> ", value) }) } } function table_copy(t) { var t2 = {} foreach(t, function(key, value) { t2[key] = value }) return t2 } # #return the number of value in table # function count(table,value){ number=0 i=0 while(i