na
Syntax Format
na(value)
Overview
The na function checks if the value is unavailable, i.e., whether the value is 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 or is nil")
end