Template:Prioritize: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>ArceusInator
This should make it easier to have multiple variables with the same meaning without having a terribly large amount of ifs
 
>ArceusInator
This should make it easier to have multiple variables with the same meaning without having a terribly large amount of ifs
(No difference)

Revision as of 20:15, 30 March 2011


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.