hello i have
tag=[1,2,3,4,5,6,7,8,9,10,11];
is there a one liner code to server log it?
also is there any better than this?
if (tag[0]==170 && tag[1]==0 && tag[2]==2 && tag[3]==1 && tag[4]==131 && tag[5]==128 && tag[6]==187)
hello i have
tag=[1,2,3,4,5,6,7,8,9,10,11];
is there a one liner code to server log it?
also is there any better than this?
if (tag[0]==170 && tag[1]==0 && tag[2]==2 && tag[3]==1 && tag[4]==131 && tag[5]==128 && tag[6]==187)
To log it:
for(local i in tag) server.log(i);
…or:
local s=""; for(local i in tag) s+=i+","; server.log(s);
For comparison, I’d just have a compare array:
local comparetag[170,0,2,1,131,128,187]; for(local i=0;i<tag.len();i++) if (tag[i]!=comparetag[i]) break; if (i==tag.len()) server.log("matches");