Skip to main content

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​

ParameterTypePurpose
errorstringError message

Example​

period = 0

if period ~= 14
error("Incorrect period")
end