GuildWiki

GuildWiki has been locked down: anonymous editing and account creation are disabled. Current registered users are unaffected. Leave any comments on the Community Portal.

READ MORE

GuildWiki
Advertisement

This solution avoids possible namespace clashes, since the Template: namespace is the "variable" namespace. What? Also, your templates can't do this, which is one of the things Ernie wanted in the first place. —Dr Ishmael Diablo the chicken 02:30, July 20, 2010 (UTC)

You've been using variable names such as NickLocation to try and avoid variable name clashes with other possible modules that might provide a Location. One example would be if this week's item would be called Nickitem for both pre-searing and post-searing Nicholas; then only one of them would appear in the text. It seems that this would be obvious when writing this down, but when one of the locations is not needed it might not be. A sentence such as "Today, pre-searing Nicholas collects {{#var:NickItem}} while post-searing Nick wanders {{#var:NickLocation}}" would depend on the order that the modules that initialize the variables for post- and pre-searing nick are called. Because of this, no two modules on the wiki may use the same variable names.
With templates, the situation cannot arise, because we can't have two different Template:NickItem pages on the wiki; when I try to create the latter, I am inevitably made aware of the former. This inevitability does not hold for variable names; we would have to protect all variable use in initialization templates with {{#if:{{#varexists:NickItem}}|Error: Variable ''NickItem'' redefined in template PreNick}} (of course we'd make a template for this, {{varexists|variablename|module}}, but still).
A more striking example is a module conflicting with itself: consider "Last weekend, Nicholas travelled from {{NickLocation|-1week}} to {{NickLocation}}." No problem with templates, but with variables, he'd go from {{#var:NickLocation}} to {{#var:NickLocation}}, and he would appear to not have moved at all. --◄mendel► 05:23, July 20, 2010 (UTC)
Actually, my variable names were TravelerItem/etc. (I forget that you're not a sysop anymore and couldn't look at my deleted pages, so I restored them.) I realized this issue from the beginning, and I was already planning ahead for possible use alongside SandfordItem, although I didn't think that would be necessary (Sandford only requires a single variable, since he's always in the same location and collects the same quantity, so it would be kinda pointless to use this extension for him). I'll cover this issue more completely on the noticeboard later. —Dr Ishmael Diablo the chicken 13:01, July 20, 2010 (UTC)
Advertisement