Member
Join Date: Jan 2006
Location: Iowa City, IA
Posts: 78
|
OK, trying to get some validation written in, and I seem to be missing something, and searching the docs (online search) didn't seem to come up with the answer...
If I write a tagis[template] expression, how *eaxctly* do I define [tempalte]? I've tried copying rules form other data sets, and copying the tag set on the unit, but I can not seem to get tagcount, tagis, etc to recognize what template I am refering to. Can someone point me to a doc section on this? And, please don't point me to the script basics, I've read them, as well as all hyperlinks to anything involving scripts, if its in there I didn't understand it. |
#1 |
Senior Member
Volunteer Data File Author
Join Date: Mar 2005
Posts: 345
|
the format is the name of the tag group, a dot then the name of the tag. If you have a tag group called kitCheck and a tag within it called rifles then the reference would be kitCheck.rifles
What error are you getting - is the rule not triggering or are you gettng an error about incorrect reference to a tag? |
#2 |
Senior Member
Volunteer Data File Author
Join Date: Mar 2005
Posts: 345
|
if you look in the pdf document for the ABC then it starts on page 107, section called manipulating tags
|
#3 |
Member
Join Date: Jan 2006
Location: Iowa City, IA
Posts: 78
|
The rule just isn't firing. I can force an invalid using an example from the sample data file, but even ripping off the syntax from another data file, I can't seem to get it to provide an invalid result on the expression. I'm fairly certain it will get resloved with my nose in the book in the right place for a bit.
Perfect, thanks for the page refrence! I printed out the PDF, and its getting dog eared fast...yet another tab about to go into it..... OH, and a random thanks for the folks on the board; I've got my data file I would say at 60%, so its coming along. |
#4 |
Senior Member
Volunteer Data File Author
Join Date: Mar 2005
Posts: 345
|
if u can post more detail with some examples you'll prob find some-one on here will b able to assist with it
|
#5 |
Member
Join Date: Jan 2006
Location: Iowa City, IA
Posts: 78
|
OK, going through the manual, it seems I'm doing this right, so I suspect I'm missing something stupid.
What I'm trying to do is, units with the tag [uct.arbb] are supposed to be 0-2. if (tagcount[uct.arbb] > 2) then @valid=0 else @valid=1 endif Is the rule I'm trying to use. But, after compiling, and switching to that game system, I can dump as many of that unit onto the roster as I want. Also tried this: if (tagcount[uct.arbb] <= 2) then @valid = 1 endif Still lets me dump them in endlessly. |
#6 |
Senior Member
Volunteer Data File Author
Join Date: Apr 2005
Location: Wellington, New Zealand
Posts: 107
|
Have you set that tag group to be global? The Validation won't pick it up
otherwise. Richard --- Bluefool <jeff_kraemer@msn.com> wrote: > OK, going through the manual, it seems I'm doing this right, so I suspect I'm > missing something stupid. > > What I'm trying to do is, units with the tag [uct.arbb] are supposed to be 0-2. > > if (tagcount[uct.arbb] > 2) then > > @valid=0 > > else > > @valid=1 > endif > > Is the rule I'm trying to use. But, after compiling, and switching to that > game system, I can dump as many of that unit onto the roster as I want. |
#7 |
Member
Join Date: Jan 2006
Location: Iowa City, IA
Posts: 78
|
See? Once again proving that rather than get frustrated, you should ask.
That was exactly it, it now works. You can have my first born, or unending gratitude, your choice . |
#8 |
Senior Member
Volunteer Data File Author
Join Date: Mar 2005
Posts: 345
|
have u tried it with an accumulated tag or set the rule to be roster based - it is just there are a lot of warnings about overheads with global tags.
the other thing to try maybe a merge rule - those a re really really useful as it can be applied to other units etc which you may want to limit, i.e. one rule can cover all of them |
#9 |
Senior Member
Volunteer Data File Author
Join Date: Mar 2005
Location: Australia
Posts: 254
|
Rob has mentioned in the past that global tags are best avoided unless you've got no other choice, accumulated tags are preferred.
They're your datafiles though, so do what you like :-) Thats the great thing about writing your own data files for AB! Russell. |
#10 |
|
|