Talk:Character: Difference between revisions
Jump to navigation
Jump to search
>OmegaK2 |
>OmegaK2 mNo edit summary |
||
Line 18: | Line 18: | ||
: Additionally, since [[User:Qetuth]] noted that it would be a bit messy in the prose text, I just made a template to cut down the length of the ask text a bit, it does the above basically: | : Additionally, since [[User:Qetuth]] noted that it would be a bit messy in the prose text, I just made a [[Template:SMW character query|template]] to cut down the length of the ask text a bit, it does the above basically: | ||
: <nowiki>{{SMW character query|stat=maximum_life_leech_rate_%_per_minute}}</nowiki> | : <nowiki>{{SMW character query|stat=maximum_life_leech_rate_%_per_minute}}</nowiki> | ||
: Yields: {{SMW character query|stat=maximum_life_leech_rate_%_per_minute}} | : Yields: {{SMW character query|stat=maximum_life_leech_rate_%_per_minute}} | ||
: --[[User:OmegaK2|OmegaK2]] ([[User_talk:OmegaK2|t]]|[[Special:Contributions/OmegaK2|c]]) 19:50, 23 November 2015 (UTC) | : --[[User:OmegaK2|OmegaK2]] ([[User_talk:OmegaK2|t]]|[[Special:Contributions/OmegaK2|c]]) 19:50, 23 November 2015 (UTC) |
Revision as of 19:51, 23 November 2015
SMW queries
So I wanted to try these queries with leech rate. The query gives:
{{#ask: -Has subobject::Character Has stat id::maximum_life_leech_rate_%_per_minute |?Has stat value= |mainlabel=- |limit=1}} <- Was 1,200 at the time of writing this.
Which is the rate per minute. So I decided to divide the value with 60 to get per second:
Expression error: Unrecognized punctuation character "{".
This does not work because it is displayed as 1,200, not 1200. Anyone know how to solve it?--Illviljan (talk) 19:07, 23 November 2015 (UTC)
- First off, you can use <nowiki></nowiki> tags to prevent parsing (i.e for comments)
- It's happening because it returns a I18N aware string, basically it formats the number based on your locale, to circumvent this, just add a hash ( # ):
- {{#expr:{{#ask: [[-Has subobject::Character]] [[Has stat id::maximum_life_leech_rate_%_per_minute]] |?Has stat value#= |mainlabel=- |limit=1}} /60}}
- Yields: Expression error: Unrecognized punctuation character "{".
- Also see smw:Help:Displaying_information#Plain_.28unformatted.29_printouts for more about this.
- Additionally, since User:Qetuth noted that it would be a bit messy in the prose text, I just made a template to cut down the length of the ask text a bit, it does the above basically:
- {{SMW character query|stat=maximum_life_leech_rate_%_per_minute}}
- Yields: Template:SMW character query