Topic on User talk:Jimyoda

Jump to navigation Jump to search
Pangaea (talkcontribs)

Hi, since you've worked on all aspects on the wiki for 4 years, figured I'd reach out to you and hope you see what the issue is. I'm working more on the animal template and trying to put in code similar to in the infobox main template, so there is a backup for mass_young and such, which relies on a formula. The code looks correct to my eyes, but something is wrong because I get an error on the actual page: Expression error: Unrecognized punctuation character "{".

This is what the code in the template looks like:

| mass_baby          = {{#vardefine: mass_baby | {{#if: {{{mass_baby|}}} | {{{mass_baby}}} | 
    {{#if: {{{mass_adult|}}} | {{#expr:{{{massadult}}}/5}} }} }} }} {{#var:mass_baby}}

The idea is to use vars to be able to store the correct data in Cargo, but without having to use the same chained ifs and whatnot in the output display section as well.

The output looks like this, but I think the error is further up, in the above section:

{{#if: {{#var:mass_baby}} | {{!}} <div>Mass baby test</div> {{!!}} {{#var:mass_baby}} kg }}