var count = 0
count++
Increment or Decrement Local Variable
BlockUtilities
Increment or decrement a numeric local variable by a value.
Inputs
VariableRequired
The local variable to modify.
Pick one of the flow's local variables.
OperationRequired
Whether to increment or decrement.
Options+ (increment)- (decrement)
ValueRequired
The amount to increment or decrement by.
Example: 1
Build a bot using blocks like Increment or Decrement Local Variable
Use this block in our visual flow editor. Bots are hosted 24/7 for free on inventor.bot.
Advanced Documentation
This documentation can be useful when using code mode. View as Markdown
ID:
increment_local_variableInputs
| Field | InventScript name | Value |
|---|---|---|
| Variable | variable | a local variable, e.g. count |
| Operation | operation | "+ (increment)", "- (decrement)" |
| Value | value | e.g. "1" |
Example InventScript
More utilities blocks
Log ErrorLog an error to the errors dashboard.Get Error DetailsRetrieve details of a logged error.Discord API PingMeasure current patency to the Discord API.Change Bot StatusUpdate the bot's presence and status text.Get Server CountGet the number of servers the bot is in.Custom LoopLoop over a customized range of numbers.Check PermissionCheck if a permission exists in a bitfield.Member/Role Has PermissionsCheck if a member or role has specific permissions.Redact SecretRedact a secret (e.g. example -> e*****e).Get Bot DetailsGet cached details of the current branch's bot user.Generate Snowflake IDGenerate a unique Snowflake-like ID.Update Local VariableSet a local variable to a new value.Append New Line to Local VariableAppend text to a local variable on a new line.CommentAdd a note or comment to your flow. This block does nothing when run.