View Single Post
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 2,599

Old September 5th, 2018, 07:52 AM
Quote:
Originally Posted by Illyahr View Post
As title.

Code:
var result as number

foreach pick in Hero from BaseSkill where "AllCraft"
  if (each.tagis[Helper.SkillFocus] <> 0) then
    result += 1
  endif
nexteach

if (result >= 1) then
  @valid = 1
endif
Getting an invalid tag error. What should I be using?
Looks like the Helper tag you used is actually correct so the error may be stemming from "AllCraft". Here's how I would rewrite this:

Code:
foreach pick in Hero from BaseSkill where "Helper.SkCatCraft"
  validif (eachpick.tagis[Helper.SkillFocus] <> 0)
nexteach
You don't need to bother with the variable. It just adds an extra step.
Sendric is offline   #3 Reply With Quote