goto()
¶
Warning
This page may contain outdated information, incompatible with the current version of Hercules and its coding standards.
Syntax¶
Description¶
This command will make the script execution jump to the specified label. It is often used by beginners in conjunction with if (...)
, before they get accustomed to other conditional statements, such as for (...)
or switch (...)
. While advanced scripters typically discourage using goto()
, it can come handy when requiring to leave a complex nested loop without having to use flags or even more complicated code.