ChainsawXIV
Active member
I need to count the number of points in a roster from units carrying a specific tag in order to run a validation script, and cant figure out how to make it run. The sample script follows, but I suspect that my problem is that I'm misunderstanding exactly what sort of data is returned by the tagvalue[ ] function. The documentation isn't really clear on what the 'value' is that is returned, and weather matching multiple instances of a tag in this way accumulates the values, or just returns the value for one instance of the tag. If anyone can fill me in on the details, and/or help me back onto the right track, that'd be great. Here's the script:
Code:
var quarter as number
quarter = this.roster.activesize / 4
if (tagcount[CharStuff.Ikit] > 0) then
if (tagvalue[SkavStuff.ClanSkryre] >= quarter) then
@valid = 1
else
@valid = 0
endif
else
@valid = 1
endif