So i'm trying to avoid writing out all the 'countitem' stuff and just do it in a loop.
- script Deleter -1,{ for(.@i = 0; .@i < getarraysize(.item[0]); .@i++) { if(countitem(.item[.@i]) >= .amt) { delitem .item[.@i], .amt; } } setarray .item[0], 501, 502, 503, 504; .amt = 1;}
But for some reason it doesn't work. Can anyone tell me where my error is exactly? Did I do the logic wrong?