Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Army Builder Forums > Army Builder

Notices

Reply
 
Thread Tools Display Modes
Mettius
Senior Member
 
Join Date: Jan 2009
Location: Austin, TX
Posts: 140

Old January 3rd, 2009, 11:26 PM
Hello all,
I have been attempting to write some Final Test Scripts for Gorkamorka data files I'm working on.

One (of many) things has me stumped.

The following code bock works as I intended, but it seems... clunky. How can I do the following more succinctly?

Note p_xxxx are profiles)
Code:
var tallyN as number

tallyN = (this.unit[p_onob] + this.unit[p_oboy] + this.unit[p_ospan] + this.unit[p_oslav] + this.unit[p_oyoof])

if (this.unit <= tallyN) then
@valid = 1
endif
Questions:
1. In profile context, what is the difference between this.unit and this.model
I'm not getting it.

2. Why didn't the following block work? (class.ork? should have matched class.orkspan, class.orknob, etc.) Though it compiled, the logic didn't work in the roster correctly, it always "failed" validation tests for the grotz).

Code:
var sizeN as number

sizeN = (tagcount[class.ork?] - tagcount)
if (sizeN <= 0) then
 sizeN = 0
endif

if (model <= sizeN) then
 @valid = 1
endif
Regards,

-Mettius

Last edited by Mettius; January 5th, 2009 at 06:25 PM.
Mettius is offline   #1 Reply With Quote
Taubay
Member
Volunteer Data File Author
 
Join Date: May 2008
Posts: 32

Old January 8th, 2009, 12:38 PM
not sure if this helps but where do you get the variable model from?

if (model <= sizeN) then
@valid = 1
endif

it's not listed in your script

this is one of my validation scripts which may help in creating them yourself

if (tagcount[ger_acc_ta.Tank] > 1) then
@valid = 0
else
@valid = 1
endif

I always set a value that will return the @valid=0 and then default to @valid=1 so the script will always return something
Taubay is offline   #2 Reply With Quote
Reply

Thread Tools
Display Modes

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


All times are GMT -8. The time now is 05: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.