Invalid Alignment Specifications?
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[ Driving me crazy! Any insights? |
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. |
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.
|
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? |
Quote:
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] 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. |
All times are GMT -8. The time now is 06:33 AM. |
Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.