Year of the Dragon: Through April 23rd, claim the adventure pack Slice of Life for free! Speak to Xatheral in the Hall of Heroes.
Game mechanics • Newbie guide • In development • DDO Store • Social Media
Challenges • Classes • Collectables • Crafting • Enhancements • Epic Destinies • Favor • Feats
Glossary • Items • Maps • Monsters • Places • Quests • Races • Reincarnation • Skills • Spells
Please create an account or log in to build a reputation and unlock more editing privileges, and then visit DDO wiki's IRC Chat/Discord if you need any help!
Template:IsValidClassAndLevel
Jump to navigation
Jump to search
Purpose[edit]
- Determine whether supplied value is a valid class abbreviation [with an optional level as second word]
- Template accepts one argument, checks the first word against the class list (Alc,Art,...) and second word to verify it is an integer between 1 and 20
- Any words past the second word are ignored (may want to add a check to kick back 0 if argument consists of 3 or more words)
- Returns 0 on failue, or 1 on success
Usage[edit]
{{IsValidClassAndLevel | = default : <empty> (will return 0) // First argument is the value to use in conditional expression }}
Examples[edit]
code | result |
---|---|
{{IsValidClassAndLevel}} | 0 |
{{IsValidClassAndLevel|}} | 0 |
{{IsValidClassAndLevel|Bad}} | 0 |
{{IsValidClassAndLevel|Art}} | 1 |
{{IsValidClassAndLevel|Art Art}} | 0 |
{{IsValidClassAndLevel|Art 0}} | 0 |
{{IsValidClassAndLevel|Art 6}} | 1 |
Categorization[edit]
Coding[edit]
0