Template talk:Indexlist/body
Something seems wrong with this template, it makes every Pokémon after Torchic fail at maths. 90+90=10, what? Bluesun 21:09, 10 November 2010 (UTC)
- Just noticed this myself, and I have the explanation and fix as well. The cause is an error in the code for the second digit, which causes it not to show up for index numbers >= 256. The first and third digits appear padded with a 0. For the fix, we just need to replace
{{padleft:{{#switch: {{#expr: floor({{{1|0}}} div 256)}}|0=0|1=1|2=2|3=3|4=4|5=5|6=6|7=7|8=8|9=9|10=A|11=B|12=C|13=D|14=E|15=F}}{{#switch: {{#expr: floor({{{1|0}}} div 16)}}|0=0|1=1|2=2|3=3|4=4|5=5|6=6|7=7|8=8|9=9|10=A|11=B|12=C|13=D|14=E|15=F}}{{#switch: {{#expr: {{{1|0}}} mod 16}}|0=0|1=1|2=2|3=3|4=4|5=5|6=6|7=7|8=8|9=9|10=A|11=B|12=C|13=D|14=E|15=F}}|3}}
with
{{#switch: {{#expr: floor({{{1|0}}} div 256)}}|0=0|1=1|2=2|3=3|4=4|5=5|6=6|7=7|8=8|9=9|10=A|11=B|12=C|13=D|14=E|15=F}}{{#switch: {{#expr: floor({{{1|0}}} div 16) mod 16}}|0=0|1=1|2=2|3=3|4=4|5=5|6=6|7=7|8=8|9=9|10=A|11=B|12=C|13=D|14=E|15=F}}{{#switch: {{#expr: {{{1|0}}} mod 16}}|0=0|1=1|2=2|3=3|4=4|5=5|6=6|7=7|8=8|9=9|10=A|11=B|12=C|13=D|14=E|15=F}}