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

Re: [psheets] Syntax question

Expand Messages
  • gsbingl
    ... Byngl ... latest ... luck
    Message 1 of 4 , Apr 1 1:10 PM
      Have you tried:
      |OIF(%.SKILL.Open Lock.RANK.EQ.0,'na',%.SKILL.Open Lock.TOTAL)|

      Byngl

      --- In pcgen@y..., "ratbearer" <ratbearer@m...> wrote:
      > I am trying to have my psheet display "na" for Trained Only skills
      > with no ranks or their total score if they do have ranks. The
      latest
      > attempt to code this looks like:
      >
      > |IIF(%.SKILL.Open Lock.RANK.EQ.0,'na',%.SKILL.Open Lock.TOTAL)|
      >
      > I've tried various ways of representing this but haven't had any
      luck
      > as yet. Any help would be appreciated.
      >
      > Thanks.
      >
      >
      >
      >
      > ratbearer
    • ratbearer
      I tried it but no go. I ve gotten this notion that the only valid pipe token in the party sheets is FOR. With your suggestion or any of the other variations I
      Message 2 of 4 , Apr 1 5:00 PM
        I tried it but no go.

        I've gotten this notion that the only valid pipe token in the party
        sheets is FOR. With your suggestion or any of the other variations I
        tried, the export seems to strip away all pipes, return string in
        between the pipes (e.g. \\%.SKILL.Open Lock.RANK\\ is not evaluated
        if set up in the IIF statement) and then seems to break out any FOR
        loops. I also tried using the second IIF variation:

        |IIF(\\%.SKILL.Open Lock.RANK\\.EQ.0)|'na'|ELSE|\\%.SKILL.Open
        Lock.TOTAL\\|ENDIF|

        and what appeared on the party sheet (a slight variation of
        psheetARC.htm) was

        IIF(\\%.SKILL.Open Lock.RANK\\.EQ.0)ELSEENDIF

        I tried this without the \\'s and the only difference was a lack of
        \\'s on the party sheet)

        With the miniscule bit of java/programming knowledge I have, I took a
        look at the code for the party export (Party.java), compared it to
        the character export (PlayerCharacter.java) and it looked like the
        only entry it checked for after a pipe was FOR. To test that out, I
        tried using the |VAR| token and got the same results (it stripped the
        pipes and returned whatever was in between).

        Am I right in thinking the party sheets are not as robust as the
        player sheets? Or is it simply a matter of me being naive and not
        using the right syntax?

        Thanks again.



        ratbearer

        p.s. would there be a better board/forum to post to for these types
        of questions or is this the appropriate one?


        --- In pcgen@y..., "gsbingl" <byngl@h...> wrote:
        > Have you tried:
        > |OIF(%.SKILL.Open Lock.RANK.EQ.0,'na',%.SKILL.Open Lock.TOTAL)|
        >
        > Byngl
        >
        > --- In pcgen@y..., "ratbearer" <ratbearer@m...> wrote:
        > > I am trying to have my psheet display "na" for Trained Only
        skills
        > > with no ranks or their total score if they do have ranks. The
        > latest
        > > attempt to code this looks like:
        > >
        > > |IIF(%.SKILL.Open Lock.RANK.EQ.0,'na',%.SKILL.Open Lock.TOTAL)|
        > >
        > > I've tried various ways of representing this but haven't had any
        > luck
        > > as yet. Any help would be appreciated.
        > >
        > > Thanks.
        > >
        > >
        > >
        > >
        > > ratbearer
      • jaymecox
        ... na ... %var.SKILL.Open Lock.TOTAL ... But, there are only five things the IIF notation supports right now: HASFEAT: HASVAR: HASEQUIP: EVEN:
        Message 3 of 4 , Apr 2 11:35 AM
          --- In pcgen@y..., "ratbearer" <ratbearer@m...> wrote:

          > between the pipes (e.g. \\%.SKILL.Open Lock.RANK\\ is not evaluated
          > if set up in the IIF statement) and then seems to break out any FOR
          > loops. I also tried using the second IIF variation:
          >
          > |IIF(\\%.SKILL.Open Lock.RANK\\.EQ.0)|'na'|ELSE|\\%.SKILL.Open
          > Lock.TOTAL\\|ENDIF|

          The IIF notation must be on seperate lines:
          |IIF(%var.SKILL.Open Lock.RANK.EQ.0)|
          'na'
          |ELSE|
          %var.SKILL.Open Lock.TOTAL
          |ENDIF|

          But, there are only five things the IIF notation supports right now:
          HASFEAT:
          HASVAR:
          HASEQUIP:
          EVEN:
          SKILLx.UNTRAINED:

          IIF (and OIF) do not currently support the IF.ELSE or EQ,NEQ notation

          There are some examples of the correct |IIF and |FOR loops in the Files->Alternate Charactersheets->csheet-MP.zip
        Your message has been successfully submitted and would be delivered to recipients shortly.