# E4104

Current loop expects different number of arguments than supplied with `continue`.

This error occurs when the number of arguments provided to a `continue`
statement does not match the number of arguments expected by the loop. In a
`loop` construct, when using `continue`, you must provide the same number of
arguments as declared in the loop header.

For example, if a `loop` takes 2 arguments, any `continue` statement within that
`loop` must also provide exactly 2 arguments. Providing too few or too many
arguments will trigger this error.

Note that in a `for` loop, you can omit all arguments in a `continue` statement.
In this case, the loop will use the default update expressions specified in the
loop header. However, if you do provide arguments to `continue`, the number of
arguments must match the number of loop variables.

For example, in a `for` loop with two variables:

- `continue` (with no arguments) will use the default updates
- `continue x, y` (with two arguments) is valid
- `continue x` or `continue x, y, z` will trigger this error

## Erroneous example

```{literalinclude} /sources/error_codes/E4104_error/top.mbt
:language: moonbit
```

## Suggestion

To fix this error, ensure that the number of arguments provided to `continue`
matches the number of loop variables. For example,

```{literalinclude} /sources/error_codes/E4104_fixed/top.mbt
:language: moonbit
```
