$function
Create a user-defined function that can be called by $callFunction or $functionName
Usage:
$function[Function name;Param 1 (optional);Param 2...(optional)]
Example:
$function[printHello;name]
Hello $name
$endFunction
2
3
Call the function, using $callFunction
Call the function, using $printHello
Global function
defining global function will allow you to execute this function from another custom command
How?
add /global to the name when defining the function
DANGER
A function name can't start with number, and must be within [A-Z or a-z or _ or 0-9] for short format ($functionName) but if you are using $callFunction to call the function, any name is valid
Calling global function for first time
You will need to use $callFunction
if you called a global function inside another custom command for first time, afterward you can use the short format i.e $printHello