Thread: Gizmo Help
View Single Post
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321

Old January 14th, 2018, 08:24 AM
Howdy!

Working on a dataset where each piece of gear can have a number of Qualities. These qualities are contained in a grCustom child on the item.

When I display the Weapon for example on the armory tab, the qualities display without issue. But, when buying a new weapon, the Qualities do not display and I'm getting an error:
Quote:
This has a gizmo attached.
- - -
Attempt to access non-existent containing entity from script
Location: 'finalize' script for Field 'grQualSumm' near line 11
This is the field and the finalize script:
Code:
    <field
      id="grQualSumm"
      name="Qualities"
      type="derived"
      maxfinal="50">
	  <!-- Final value for display is a blending of the various range values -->
      <finalize><![CDATA[
        var txt as string
		var tags as string
		var ismore as number
		
	~if this is a thing, we have to pull the tags from any attached gizmo
        if (ispick = 0) then
          if (isgizmo = 1) then
		    notify "This has a gizmo attached."
		    ismore = 0
		    foreach pick in gizmo where "component.GearQual"
			  if (ismore <> 0) then
			    tags &= ", "
				endif
				
			  tags = eachpick.tagnames[ItemQual.?,", "]
			  
			  ismore = 1
			  nexteach
            endif
		else
		  tags = tagnames[ItemQual.?,", "] 
		endif
		  
		if (empty(tags) = 0) then
		  txt &= " " & tags
		else
		  txt &= "-"
		  endif
		  
	    @text = txt
		
        ]]></finalize>
      </field>
Anyone have any idea what I'm missing when trying to step through the gizmo?

Working on -
  • (SWADE) WIP Savage Rifts
  • Savage Rifts (Deluxe): Update link in This post
  • Star Trek Adventures: Update link in This post
TCArknight is offline   #1 Reply With Quote