error
Syntax Format
error(message)
Overview
The error
function stops the execution of the script and displays the message text. This function can be useful when detecting errors in a script, as well as bug testing.
Parameters
Parameter | Type | Purpose |
---|---|---|
error | string | Error message |
Example
period = 14
if period ~= 14
error("Incorrect period")
end