warn
Writes a yellow warning. Same name and meaning as Luau warn. Use for recoverable problems.
Syntax
Section titled “Syntax”void warn(...);Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
... | any | Warning payload. |
Return value
Section titled “Return value”void.
Luau emit
Section titled “Luau emit”warn(...)
Description
Section titled “Description”Does not stop the thread. Pair with guard when the failure is expected and you return afterwards. Use report when the program cannot continue.
Example
Section titled “Example”guard (player != null) else { warn("Invalid player"); return;}Emits:
if not (player ~= nil) then warn("Invalid player") returnend