Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,243
|
TCArknight, here's the wiki page about dynamic tables: http://hlkitwiki.wolflair.com/index....Element_(Data)
The answer you're looking for is in the section labeled "headerpick" |
#21 |
Senior Member
Volunteer Data File Author
Join Date: Feb 2009
Posts: 173
|
Just ran into this problem myself. Add this attribute:
headerpick="some_thing" to the dynamic_table element. [Sorry. Posted this before I refreshed the thread]. Last edited by Kairos; April 10th, 2013 at 09:17 AM. Reason: Oops. |
#22 |
Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,337
|
I appreciate the help! That's now working.
I don't have the code in front of me as I'm at work, but I'm running into an issue for displaying the gadget output. I have a foreach loop stepping through each gadget on the hero. I'm able to output the name field with no issue. However, when I try to use another foreach loop to step through the children on the gadget, I get an error message. Is there a trick to using nested foreach loops in this kind of case? Or would it be better to count the number of children and then do a simple for loop using gizmo.child to step through each on and get the name values of the children traits? |
#23 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,243
|
I'll need to see the code, and you'll need to right-click and copy the error message, so that you can paste it here. What you've described is too vague to figure out what's going on.
|
#24 |
Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,337
|
Ok, thanks. I'll post it this evening when I get off work...
|
#25 |
Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,337
|
I get this error:
Quote:
Code:
<procedure id="sbgadgets" scripttype="synthesize"><![CDATA[ var ismore as number var i as number var gadgetid as string append @boldon & "Gadgets: " & @boldoff & @newline ~output the details of all resources ismore = 0 foreach pick in hero where "HasGadget.?" ismore = 1 gadgetid = "thingid." & eachpick.idstring append @indent & eachpick.field[name].text foreach bootstrap in pick where "component.Ability" notify eachthing.idstring nexteach if (ismore = 0) then append @indent & "-none-" & @newline endif append @newline nexteach ~if we have no resources, output that fact if (ismore = 0) then append @indent & "-none-" & @newline endif ]]></procedure> |
|
#26 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,243
|
Code:
foreach bootstrap in eachpick.gizmo where "component.Ability" notify eachpick.idstring nexteach |
#27 |
Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,337
|
I still get an error:
Quote:
|
|
#28 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,243
|
I need to see line 17, please - that's the line it says this error is on.
|
#29 |
Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,337
|
Ok, I cleaned the procedure up a bit, and this error is on a new line.
Quote:
Code:
<procedure id="sbgadgets" scripttype="synthesize"><![CDATA[ var ismore as number var i as number var gadgetid as string append @boldon & "Gadgets: " & @boldoff & @newline ~output the details of all resources ismore = 0 foreach pick in hero where "HasGadget.?" ismore = 1 gadgetid = "thingid." & eachpick.idstring append @indent & eachpick.field[name].text & "(" & gadgetid & ")" foreach bootstrap in eachpick.gizmo where "component.Ability" notify eachpick.idstring nexteach if (ismore = 0) then append @indent & "-none-" & @newline endif append @newline nexteach ~if we have no resources, output that fact if (ismore = 0) then append @indent & "-none-" & @newline endif ]]></procedure> Code:
notify eachthing.idstring Quote:
|
||
#30 |
|
|