DayZ Wiki

Custom Health 3.jpg DayZ Wiki Update Project!DayZ has undergone a lot of big changes in a short timespan. We need you to help us keep our pages and images up to date! Want to get started? Follow the link or Join the Update Project on Discord!

READ MORE

DayZ Wiki
Advertisement

anybody knows why we need the if function here?--TheBlackDracula (talk)

Best not to assume that all items or topics have the exact same name between versions. The #if gives you an easy way to handle any such cases that come up. oOeyes User-Eyes-Sig.png 17:20, 16 February 2015 (UTC)
yeah but when the article name changes, the name attribut is usually changed too, so its a bit pointless--TheBlackDracula (talk)
Running a #if takes some small fraction of a millisecond during page saves and recaches. The IT field considers premature optimization a bad thing for good reason. Any benefit of removing it is miniscule. Since it's just a simple #if, I wouldn't even buy the argument for removing it on readability grounds. It's harmless and may be useful in the future, so best left in place, IMO. oOeyes User-Eyes-Sig.png 19:49, 16 February 2015 (UTC)
i couldnt care less about the speed of #if ^^. i was only looking into the problem with the mod weapon table and the weapon templates and didnt knew the purpose of the #if--TheBlackDracula (talk)
Is that sorted out? Do you want assistance with anything? oOeyes User-Eyes-Sig.png 20:32, 17 February 2015 (UTC)
some help would be nice:
1. the #set function doesnt seem to work in some (or all?) mod weapon pages: Mod:M4A1
2. the #ask function in the comparison table in Template:WeaponQueryTable on Mod:Weapons gives multiple entries for the same weapon out. this seems to primarily affect weapons that have mod and standalone articles (M4 and Revolver). in addition if you ask for the name attribute of the mod articles, it gives you not only hundred outputs, but also only the name of the standalone pages, not the one of the mod page:

i'm not the fittest with the software, so some tips would be really appreciated :)--TheBlackDracula (talk)

Going to put my reply on the admin noticeboard because this does require dev action, and it's easier to keep track of these things there. oOeyes User-Eyes-Sig.png 01:36, 18 February 2015 (UTC)
Advertisement