natiny.script.get_error
natiny.script.get_error(script) -> string
Returns the message from the last failed run or call in that script.
Parameters
| Name | Type | Description |
|---|---|---|
script |
number |
The script to ask |
Returns
| Type | Description |
|---|---|
string |
The message, or "" when nothing has failed |
Example
if natiny.script.run(mod, source) ~= natiny.script.OK then
print("mod disabled: " .. natiny.script.get_error(mod))
end