Can anyone help me troubleshoot this expression please?

Table:104c
Set: sibs ={1d6-1}
Set: bo ={1d6}
{ if({sibs}==0, 'Only Child', (Siblings {sibs} Birth order {if({bo} > {sibs}, '[|Firstborn|Lastborn]', '{bo}')}))}

I can get
Set: sibs ={1d6-1}
Set: bo ={1d6}
Siblings {sibs} Birth order {if({bo} > {sibs}, '[|Firstborn|Lastborn]', '{bo}')}

and

Table:104c
Set: sibs ={1d6-1}
Set: bo ={1d6}
{ if({sibs}==0, 'Only Child', 'other')}

To work but i cant get the combined table to run , Ive spend 4 days coding the entire central casting heroes now to a set of tables and its the last problem Ive ran in to

Comments

  • edited May 22

    I think "if" is intended for arithmetic functions. You're trying to use it to contain other kinds of content and I think that's where things go awry. Try using "when" instead:

    Table:104c
    Set: sibs ={1d6-1}
    Set: bo ={1d6}
    [when]{sibs}=0[do]Only Child[else]Siblings {sibs} Birth order {if({bo} > {sibs}, '[|Firstborn|Lastborn]', '{bo}')}[end]

    Results:

    Siblings 5 Birth order 5

    Siblings 2 Birth order Firstborn

    Only Child

    Siblings 4 Birth order Lastborn

  • Thank you so much jdale I really appreciate it

Leave a Comment