Template:Prioritize

From Legacy Roblox Wiki
Revision as of 20:15, 30 March 2011 by >ArceusInator (This should make it easier to have multiple variables with the same meaning without having a terribly large amount of ifs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


The Prioritize template makes it easier to have multiple variables with the same meaning while keeping your code (somewhat) legible.

Example
{{Prioritize|{{{a}}}|{{{A}}}|{{{Aai}}}}}

Would first check to see if the user used "a", then "A", then "Aai" and would return the first match found. If no matches were found, it returns "a".

If the 4th and 7th worked, the 4th would be used because it was read first. It can only accept 10 arguments. If you have more than 10, you can make the 10th argument another Prioritize template.