Skip to content

Commit 2c6b28b

Browse files
add info about adding cases to switch statement (#387)
* add info about adding cases to switch statement * fix: formatting --------- Co-authored-by: Whipstickgostop <[email protected]>
1 parent d87c3e6 commit 2c6b28b

File tree

1 file changed

+13
-0
lines changed
  • streamerbot/3.api/1.sub-actions/core/logic

1 file changed

+13
-0
lines changed

streamerbot/3.api/1.sub-actions/core/logic/switch.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,16 @@ parameters:
2020
- `0`{lang=cs} can be auto-typed to a numeric type such as `int`{lang=cs} or `long`{lang=cs}
2121
- `true`{lang=cs} or `false`{lang=cs} can be auto-typed to a `bool`{lang=cs}
2222
---
23+
24+
You can add any number of cases to a switch by right clicking on the `switch` Sub-Action and selecting "Add Case"
25+
26+
![Switch Sub-Action context menu showing "Add Case" option](assets/switch-add-case-context-menu.png)
27+
28+
You can add one or more values to a case. If any of the case's values match the `switch` input, that case will be executed.
29+
30+
![Add Case Dialogue](assets/switch-add-case-dialogue.png)
31+
32+
::note
33+
Only the first matching case will be executed.
34+
- If no cases match, the `default` case will be executed.
35+
::

0 commit comments

Comments
 (0)