A Gearswap Academia - Class 3 |
||
A Gearswap Academia - Class 3
Leviathan.Draugo
Offline
Keep em coming! Thank you!
In this lesson, the :match() construction is an example of some Lua syntactic sugar (special shortcut syntax) referring to the standard Lua string.match function.
Let's look at this example: Code if spell.name:match('Cure') then This is a shortcut for calling string.match() with two parameters: spell.name, which is indeed a string, and a second string pattern, 'Cure'. Written out in full Lua syntax, it would look something like this: Code if string.match(spell.name, 'Cure') then You'll see this type of shortcut used all over the place in various Windower Lua things, so it is probably helpful to understand exactly what's happening. |
||
All FFXI content and images © 2002-2024 SQUARE ENIX CO., LTD. FINAL
FANTASY is a registered trademark of Square Enix Co., Ltd.
|