Loading ...
Sorry, an error occurred while loading the content.

Odd bug when editting the Covenants Print Filter

Expand Messages
  • darius_ml
    Folks, I m encountering something very odd when fiddling with the Covenants ArM5 print filter. In the include file CovenantsFilter.inc I m altering the
    Message 1 of 3 , Jul 5, 2008
    • 0 Attachment
      Folks,

      I'm encountering something very odd when fiddling with the Covenants
      ArM5 print filter. In the include file CovenantsFilter.inc I'm
      altering the PrintLibrary sub. I'm having trouble outputting the
      level of a Summa it always prints 0. The attribute is set correctly,
      as evidenced when I dump the book's opts.

      Code below:

      @sub PrintLibrary()
      @if listEntries('Library') > 0
      @var except[]='Covenant Cost', 'Type', 'Total
      Quality', 'Author', 'Topic', 'Language'
      @spaceabove 1ln
      @StartBox()
      @tabs 1 -.05"
      @Hdr('Library Cost')
      @foreach(Library)
      @if incategory('Book|Casting
      Tablet|Significato|Realia')
      @bold
      @output %@Name% by %@Author% %@Covenant
      Cost%
      @plain
      @leftindent .1"
      @firstindent .1"
      @italic
      @if @Type = 'Tractatus'
      @output %@Topic% %@Type%: Final
      Quality %@Total Quality% in %@Language%
      @elseif @Type = 'Summa'
      @output %@Topic% %@Type%: Level %
      @Level% Final Quality %@Total Quality% in %@Language%
      @endif
      @plain
      @leftindent 0
      @firstindent 0
      @PrintNotes(1, except, true)

      [...]

      Everything else works a treat. Any ideas?

      Regards,
      Paul Gilbertson

      PS: The ArM5 Character sheet is a thing of Divine Beauty, but the
      Covenants sheet, I'm sorry to say, needs work.
    • Support
      You ve run into an ambiguity in the filter code. There are predefined keywords for certain item attributes (@cost, @level, etc.), that refer to the things on
      Message 2 of 3 , Jul 5, 2008
      • 0 Attachment
        You've run into an ambiguity in the filter code. There are predefined
        keywords for certain item attributes (@cost, @level, etc.), that refer
        to the things on the item itself, not the options. If you happen to name
        an option one of those things, you'll get the attribute instead of the
        option. In this case the shortcut of referring to an option with
        %@Option Name% won't work..

        Use %optvalue("Level")% and you'll get the value of the Level option.
        > Code below:
        > @elseif @Type = 'Summa'
        > @output %@Topic% %@Type%: Level %
        > @Level% Final Quality %@Total Quality% in %@Language%
        >
      • darius_ml
        ... refer ... name ... the ... Ack... I thought it may be something like that. Fixed now, thanks. Regards, Paul Gilbertson
        Message 3 of 3 , Jul 5, 2008
        • 0 Attachment
          --- In cw@yahoogroups.com, Support <bkvam@...> wrote:
          >
          > You've run into an ambiguity in the filter code. There are predefined
          > keywords for certain item attributes (@cost, @level, etc.), that
          refer
          > to the things on the item itself, not the options. If you happen to
          name
          > an option one of those things, you'll get the attribute instead of
          the
          > option. In this case the shortcut of referring to an option with
          > %@Option Name% won't work..
          >
          > Use %optvalue("Level")% and you'll get the value of the Level option.

          Ack... I thought it may be something like that. Fixed now, thanks.

          Regards,
          Paul Gilbertson
        Your message has been successfully submitted and would be delivered to recipients shortly.