Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Authoring Kit

Notices

Reply
 
Thread Tools Display Modes
sincla
Member
 
Join Date: Aug 2014
Posts: 52

Old September 4th, 2014, 04:17 PM
The compiler is constantly throwing an "Invalid Alignment Specification" error over the following position script, and I have no idea why. The problem is on line 8, aligning portal[name] to the right of portal[level]:

Code:
	<position><![CDATA[
1
2                ~center the portals vertically
3                perform portal[level].centervert
4                perform portal[name].centervert
5                perform portal[HP].centervert
6	  
7	        perform portal[level].alignedge[left,3]
8	        perform portal[name].alignrel[ltor,level,3]
9	        perform portal[HP].alignedge[right,-3]
	        ]]></position>
This has worked in other scripts including one in the same file and I can't find any documentation on what constitutes invalid alignment specifications.

Driving me crazy! Any insights?
sincla is offline   #1 Reply With Quote
sincla
Member
 
Join Date: Aug 2014
Posts: 52

Old September 4th, 2014, 05:52 PM
Got it! The "Invalid Alignment Specification" was because the portal definition was invalid. After deleting everything in the position script, the new error message was that I did not have the required "additem" element for my dynamic table that contained this template. Though the documentation said this element was optional.

I added an "additem" script to the table element. It then told me that the portals "level" and "HP" were referencing fields that were not present in the compset. This confused me because the compset was exactly the one I wanted. So I want to check the definition of the compset in the structure files, and lo and behold I had the wrong component name in the compref element.

It's instructive how you can't really always rely on the final error message given to you, but have to work your way backwards by eliminating one-by-one the things throwing error messages until you find the root cause which could be a different error message entirely.
sincla is offline   #2 Reply With Quote
sincla
Member
 
Join Date: Aug 2014
Posts: 52

Old September 4th, 2014, 11:04 PM
There's also an additional issue it seems. A template within a table doesn't seem to have a well-defined width or edge and so you can't use an alignedge reference without throwing errors with a template in a table.
sincla is offline   #3 Reply With Quote
Colen
Senior Member
Lone Wolf Staff
 
Join Date: Dec 2008
Posts: 4,690

Old September 5th, 2014, 09:30 AM
The "additem" element is optional, but if you don't specify it for a dynamic table, you have to specify an "addtemplate" attribute with the portal id. You always need one or the other.

It does sound like the error messages here are quite unhelpful, so I'll put this on the bug list to improve in a future release.

I regularly use alignedge on templates within tables, so something like you posted above:

perform portal[HP].alignedge[right,-3]

Should work fine, as far as I know. If you comment out the line with the alignedge statement, do you get a different error, or is the error definitely with that line?
Colen is offline   #4 Reply With Quote
sincla
Member
 
Join Date: Aug 2014
Posts: 52

Old September 5th, 2014, 09:40 AM
Quote:
Originally Posted by Colen View Post
The "additem" element is optional, but if you don't specify it for a dynamic table, you have to specify an "addtemplate" attribute with the portal id. You always need one or the other.

It does sound like the error messages here are quite unhelpful, so I'll put this on the bug list to improve in a future release.

I regularly use alignedge on templates within tables, so something like you posted above:

perform portal[HP].alignedge[right,-3]

Should work fine, as far as I know. If you comment out the line with the alignedge statement, do you get a different error, or is the error definitely with that line?
I have an addtemplate set up for this table, so that's all good.

The align statements still don't work, so I had to position the portals horizontally by simply adding spacing.

I copied those align statements back in to do testing as you requested.

I got the same "Invalid alignment specification given" for the

Code:
perform portal[name].alignrel[ltor,level,3]
line.

I then commented out that line but still got the same error.

I then commented out the remaining alignedge lines one by one and got the same "Invalid alignment specification given" error message. Based on your response, I now don't know why it's happening.

Last edited by sincla; September 5th, 2014 at 11:22 AM. Reason: Forgot a detail
sincla is offline   #5 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 12:48 AM.


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