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

Re: [pcgen] HTML export stripping vertical bars when using modified template

Expand Messages
  • Mike Elliott
    The vertical bar is a pre processor token in PCGen.  Therefore, your || is being processed before the html is written and likely converted to a variable who s
    Message 1 of 3 , Dec 12, 2011
      The vertical bar is a pre processor token in PCGen.  Therefore, your || is being processed
      before the html is written and likely converted to a variable who's name is a null string.
      Since that variable is notavailable, nothing is inserted and the || is removed. 


      In other words, you can write && javascript commands, but not ||.  You have to break
      it up into two separate if statements.

      -Satin Knights



      ________________________________
      From: Matt Harris <matt_j_harris@...>
      To: pcgen@yahoogroups.com
      Sent: Sunday, December 11, 2011 8:20 PM
      Subject: [pcgen] HTML export stripping vertical bars when using modified template


       
      Not sure which PCGen group this should go to...

      I noticed that the csheet_fantasy_laptop.htm sheets weren't taking into
      account Acrobatics ranks when Fighting Defensively and Full Defense.
      Looking at the output html, I saw that the sheets were essentially for
      3.5 (looking at Tumble not acrobatics).

      So I added a couple of lines to the resulting himl in what looked to be
      the relevant sections:

      var acrobaticsRanks = 0;

      if ( SkillArr[i].name == "Acrobatics" )
      {
      acrobaticsRanks = SkillArr[i].rank;
      break;
      }

      and modified "else if ( tumbleRanks>= 5)" to "else if (
      tumbleRanks>= 5 || acrobaticsRanks>= 3 )"

      This worked correctly, so I made a copy of the template and made the
      same changes to that.

      When I exported my character using my custom template, the html output
      was missing the vertical bar characters, i.e.:

      "else if ( tumbleRanks>= 5 || acrobaticsRanks>= 3 )" became
      "else if ( tumbleRanks>= 5 acrobaticsRanks>= 3 )"

      What am I doing incorrectly? Is there an escape character needed for
      vertical bars.

      --
      Matt Harris
      matt_j_harris@...
      ICQ: 1656005
      www.launchpadzero.net

      .



      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.