Template:Version: Difference between revisions

From Against the Storm Official Wiki
m (added example of when a page is up to date.)
m (added call to action to update the current version if the wiki doesn't know the game has been updated!)
Line 3: Line 3:
<code><nowiki>{{#invoke:VersionMessageBox|checkVersion|updated={{{1|{{{updated|}}} }}}|currentVersion={{CurrentVersion}} }}</nowiki></code>
<code><nowiki>{{#invoke:VersionMessageBox|checkVersion|updated={{{1|{{{updated|}}} }}}|currentVersion={{CurrentVersion}} }}</nowiki></code>


This template references <code><nowiki>{{CurrentVersion}}</nowiki></code>, which is currently {{CurrentVersion}}.
This template references <code>{{[[Template:CurrentVersion|CurrentVersion]]}}</code>, which is currently {{CurrentVersion}}. If that's not correct, please go update it!


Place this template at the top of every page.
Place this template at the top of every page.
Line 17: Line 17:
{{Version|{{CurrentVersion}} }}
{{Version|{{CurrentVersion}} }}


There's a call to the template above this line.
There's a call to the template above this line, but since it's referencing the up-to-date game version, the information box does not appear.


</noinclude>
</noinclude>

Revision as of 02:33, 14 March 2023


{{#invoke:VersionMessageBox|checkVersion|updated={{{1|{{{updated|}}} }}}|currentVersion={{CurrentVersion}} }}

This template references {{CurrentVersion}}, which is currently 1.4.17. If that's not correct, please go update it!

Place this template at the top of every page.

Example

Script error: The function "checkVersion" does not exist.

Then when the page text follows the call to the template, the version message box will appear nicely above the text.

But when you make a page up to date with the current version of the game, and you write the current version of the game in the argument, there will be no message box.

Script error: The function "checkVersion" does not exist.

There's a call to the template above this line, but since it's referencing the up-to-date game version, the information box does not appear.