assert
From SmartBots Developers Docs
Bot PlaygroundBuilt-in Functions
Revision as of 12:58, 18 September 2025 by Gtaskincentral (Talk | contribs) (Add the _assert function)
Jump to: navigation, search
Logs data to the error log if the assertion is false.
var online = await Bot.isOnline();
_assert(online, "Bot is not online");
Reference
This command accepts the following parameters:
| Variable | Required | Description
| |
|---|---|---|---|
| Input: | |||
| assertion | yes | Any boolean expression. | |
| errorMessage | yes | The message to send to the error log if assertion is false. | |
| Output: | |||
| result | This function does not return anything | ||
- assert