Difference between revisions of "ConvertRating/Single"

From Sega Retro

 
(One intermediate revision by the same user not shown)
Line 7: Line 7:
  
 
|1-5s={{#vardefine:displayRating|{{StarRating|{{#var:value}}|5}}}}{{#vardefine:score|{{#expr:({{#var:value}}-1)*25}}}}
 
|1-5s={{#vardefine:displayRating|{{StarRating|{{#var:value}}|5}}}}{{#vardefine:score|{{#expr:({{#var:value}}-1)*25}}}}
 +
 +
|0-6s={{#vardefine:displayRating|{{StarRating|{{#var:value}}|6}}}}{{#vardefine:score|{{#expr:{{#var:value}}*(100/6)}}}}
  
 
|1-6s={{#vardefine:displayRating|{{StarRating|{{#var:value}}|6}}}}{{#vardefine:score|{{#expr:({{#var:value}}-1)*20}}}}
 
|1-6s={{#vardefine:displayRating|{{StarRating|{{#var:value}}|6}}}}{{#vardefine:score|{{#expr:({{#var:value}}-1)*20}}}}
Line 159: Line 161:
 
|#default={{#vardefine:displayRating|Unknown system! ("{{#var:system}}")}}{{#vardefine:score|}}
 
|#default={{#vardefine:displayRating|Unknown system! ("{{#var:system}}")}}{{#vardefine:score|}}
 
}}</includeonly><noinclude>Rating conversion code for when there's only one value - stops Mediawiki from complaining about recursion.
 
}}</includeonly><noinclude>Rating conversion code for when there's only one value - stops Mediawiki from complaining about recursion.
[[Category:Sega Retro templates]]</noinclude>
+
[[Category:Templates]]</noinclude>

Latest revision as of 13:13, 1 January 2022

Rating conversion code for when there's only one value - stops Mediawiki from complaining about recursion.