• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

using tagis with a string

lifer4700

Well-known member
I am in an Eval Script on a custom Archetype.

Within a "foreach pick" loop, I wish to "if (eachpick.tagis[...] <> 0) then"

If I hardcode the value inside the tagis brackets (e.g.: eachpick.tagis[IsWeapon.wLongbow] ), then everything works fine.

However, I don't have the luxury of hardcoding the target weapon type, I'm reading it from another pick.

So, I have a variable, declared as string that contains something like "IsWeapon.wLongbow".

If I put the variable inside the tagis brackets, I get an "Invalid styntax for tag template" error upon compile.


I found something called tagvaluestr, and tried all kinds of permutations with that, but I keep getting the same error.

Any guidance?
 
The foreach can search by a String value. So could you set a variable called "Search" with your tag instead and then your foreach would only pick up that weapon when it found it.

In example:
Code:
var sSearch as string
sSearch = "ArmorClass.Light"

foreach pick in hero from BaseArmor where sSearch
  ~ do stuff
nexteach

Otherwise it may work better to explain what you WANT to accomplish as their maybe a better/easier way.
 
Back
Top