na
Syntax Format
na(value)
Overview
The na
function checks if the value is available, i.e., the value is not nan or nil. The function is useful when doing checks on provided data in a script before performing further operations with it.
Parameters
Parameter | Purpose |
---|---|
value | Input value |
Returns: boolean
.
Example
div = close / open
if na(div) then
print("Value is not a number")
end