lua 添加的时候去重
result = {}
ids = {1,9,6,7}
affs = {3,2,4,5,6}
count =0
for s in *ids
result[s]=s
for p, v in pairs result
count = count + 1
print(count.."pppp")
for s in *affs --{1,2,4,5,6,7}
for k in *result
if s ~= k and count <4 and result[s]~=s
result[s]=s
count = count+1
break
for p, v in pairs result
print(v)
作者:改改改
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利.