Lone Wolf Development Forums  

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

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Harkan_again
Senior Member
 
Join Date: May 2012
Posts: 206

Old December 8th, 2012, 07:48 AM
Hi there

I'm trying to set a procedure up that is passed a tag name in the string format which then tags the target (in this case unit.children).

Running tests on it it works fine with the following:

var tagRet as number
tagRet = unit.assignstr("xxxxx.xxxx")

As soon as I change it to:

var tagRet as number
tagRet = unit.children.assignstr("xxxxx.xxxx")

I get an "Unexpected exception thrown during script evaluation" message. The file compiles with no issues and it is only when the procedure runs this is created.

The scenario is for a Division unit that can be assigned different nationalities, each of these affects the units that can be taken and the options each unit has. Being able to use a procedure where the tag name is passed as a string would mean one procedure rather than lots of repeated lines of code that tag and change the unit name

*edit* The format of set up within AB is the Division is a unit, it then has options that set the nationality. This script is being called from these options and is acting to change the name of the division, and tag child units of the division. Child units are controlled by live tags for each nationality, the units then have various options controlled by live tags for nationality

Any ideas with the exception thing or does assignstr not work to a unit.children level? I checked the authoring kit pdf and it does not mention assignstr

thanks

Last edited by Harkan_again; December 8th, 2012 at 07:54 AM.
Harkan_again is offline   #1 Reply With Quote
 


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 04:41 PM.


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