Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Army Builder Forums > Army Builder
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Warmonger
Member
Volunteer Data File Author
 
Join Date: Apr 2005
Location: North Western Arizona
Posts: 97

Old February 16th, 2005, 07:53 AM
I'm having trouble with the following rule. With only the one unit in
the roster, it is not validating correctly. If I'm following my logic
correctly, because the tyTags.AddHW is 2 it should skip the group
portion and return a result of 1. Or am I misunderstanding the way
the tagcount[] works?


Here's my current tag settings:
tyTags.Warriors = 1
tyTags.Winged = 3
tyTags.AddHW = 2
Group.HQ = 0
Group.Fast = 0

Here's my rule, set at the unit level:
var result as number
if (tagis[tyTags.Warriors] + tagis[tyTags.Winged] >= 2) then
if (tagcount[tyTags.AddHW] < 2) then
if (tagis[Group.HQ] + tagis[Group.Fast] = 0) then
result = 0
done
else
result = 1
endif
else
result = 1
endif
else
result = 1
endif
@valid = result
Warmonger is offline   #1 Reply With Quote
dom at wendndom.karoo.co.
Guest
 
Posts: n/a

Old February 16th, 2005, 12:17 PM
Is this one unit of Warriors and does it consist of one Warrior? If
thats the case then is the one model got the 3 tags for wings or do
they come from other units?


What is the script trying to validate as well - is it a restriction
on the a number of units in the roster or a number of objects within
a unit?

--- In armybuilder@yahoogroups.com, "d_verley" <warmonger@p...> wrote:
>
> I'm having trouble with the following rule. With only the one unit
in
> the roster, it is not validating correctly. If I'm following my
logic
> correctly, because the tyTags.AddHW is 2 it should skip the group
> portion and return a result of 1. Or am I misunderstanding the way
> the tagcount[] works?
>
>
> Here's my current tag settings:
> tyTags.Warriors = 1
> tyTags.Winged = 3
> tyTags.AddHW = 2
> Group.HQ = 0
> Group.Fast = 0
>
> Here's my rule, set at the unit level:
> var result as number
> if (tagis[tyTags.Warriors] + tagis[tyTags.Winged] >= 2) then
> if (tagcount[tyTags.AddHW] < 2) then
> if (tagis[Group.HQ] + tagis[Group.Fast] = 0) then
> result = 0
> done
> else
> result = 1
> endif
> else
> result = 1
> endif
> else
> result = 1
> endif
> @valid = result
  #2 Reply With Quote
Warmonger
Member
Volunteer Data File Author
 
Join Date: Apr 2005
Location: North Western Arizona
Posts: 97

Old February 16th, 2005, 12:57 PM
No, this is a unit, that has 3 models, and then it has two child units at 1 model each. The child units are where the tyTags.AddHW tags are coming from. I just thought that maybe because they are children, they are not showing up in the unit context? How would I include them if that's the case?

---------- Original Message ----------------------------------
From: "harkanironfist" <dom@wendndom.karoo.co.uk>
Reply-To: armybuilder@yahoogroups.com
Date: Wed, 16 Feb 2005 19:10:23 -0000

>
>
>Is this one unit of Warriors and does it consist of one Warrior? If
>thats the case then is the one model got the 3 tags for wings or do
>they come from other units?
>
>
>What is the script trying to validate as well - is it a restriction
>on the a number of units in the roster or a number of objects within
>a unit?
>
>--- In armybuilder@yahoogroups.com, "d_verley" <warmonger@p...> wrote:
>>
>> I'm having trouble with the following rule. With only the one unit
>in
>> the roster, it is not validating correctly. If I'm following my
>logic
>> correctly, because the tyTags.AddHW is 2 it should skip the group
>> portion and return a result of 1. Or am I misunderstanding the way
>> the tagcount[] works?
>>
>>
>> Here's my current tag settings:
>> tyTags.Warriors = 1
>> tyTags.Winged = 3
>> tyTags.AddHW = 2
>> Group.HQ = 0
>> Group.Fast = 0
>>
>> Here's my rule, set at the unit level:
>> var result as number
>> if (tagis[tyTags.Warriors] + tagis[tyTags.Winged] >= 2) then
>> if (tagcount[tyTags.AddHW] < 2) then
>> if (tagis[Group.HQ] + tagis[Group.Fast] = 0) then
>> result = 0
>> done
>> else
>> result = 1
>> endif
>> else
>> result = 1
>> endif
>> else
>> result = 1
>> endif
>> @valid = result
>
>
>
>
>
>To unsubscribe from this group, email
>
>armybuilder-unsubscribe@yahoogroups.com
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>





__________________________________________________ ______________
Warmonger is offline   #3 Reply With Quote
Colen
Senior Member
Lone Wolf Staff
 
Join Date: Dec 2008
Posts: 4,690

Old February 17th, 2005, 12:31 PM
At 04:46 PM 2/16/2005 +0000, you wrote:


>I'm having trouble with the following rule. With only the one unit in
>the roster, it is not validating correctly. If I'm following my logic
>correctly, because the tyTags.AddHW is 2 it should skip the group
>portion and return a result of 1. Or am I misunderstanding the way
>the tagcount[] works?
>
>
>Here's my current tag settings:
> tyTags.Warriors = 1
> tyTags.Winged = 3
> tyTags.AddHW = 2
> Group.HQ = 0
> Group.Fast = 0
>
>var result as number
>if (tagis[tyTags.Warriors] + tagis[tyTags.Winged] >= 2) then


This should evaluate to 'true', because 1 + 1 >= 2.


> if (tagcount[tyTags.AddHW] < 2) then


This should evaluate to 'false', because you only have 2 AddHW tags.


> else
> result = 1
> endif
>endif
>@valid = result


So you should end up with '@valid = 1'. I assume this isn't the result
you're seeing?

You say this is with a single unit - does this unit have any children? Is
the tyTags group marked as 'accrued'?



--
Colen McAlister (colen@wolflair.com)
Lone Wolf Development www.wolflair.com
Colen is offline   #4 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CD isn't working BobFromMarketing Army Builder 1 September 28th, 2005 12:44 PM
Validation rule script esoiset at sbcglobal.net Army Builder 8 March 7th, 2005 10:24 AM
Validation script question. Warmonger Army Builder 7 January 30th, 2005 01:24 PM
i am working on a new ig aliensister22152 at yahoo Army Builder 0 August 2nd, 2003 12:59 AM


All times are GMT -8. The time now is 07:38 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.