Skip to content

Commit 234954d

Browse files
fix off by one index in parse example (#373)
1 parent f143bc8 commit 234954d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

streamerbot/2.guide/03.variables.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,13 @@ Fetches the value of the argument named by `parse`'s parameter, which itself can
180180
// Same results as %user%
181181
$parse(user)$
182182

183-
// First, Set Argument %i% to 1
183+
// First, Set Argument %i% to 0
184184
$parse(line%i%)$
185-
// ==> returns value of %line1% (the first line of the file)
185+
// ==> returns value of %line0% (the first line of the file)
186186
187-
// Set Argument %i% to $math(%i%+1)$ (i.e., 2)
187+
// Set Argument %i% to $math(%i% + 1)$ (i.e., 1)
188188
$parse(line%i%)$
189-
// ==> returns value of %line2% (the second line of the file)
189+
// ==> returns value of %line1% (the second line of the file)
190190
```
191191
::tip
192192
`%arguments%` and `~persistedVariables~` will be parsed in `parse`'s parameter, but not other `$inline()$` functions. If you wish to use a function, then set another argument to the output of the function, and use that argument in the `parse` instead.

0 commit comments

Comments
 (0)