v0.13.7
errors and warnings / parsing

errors and warnings / parsing / E0114

E0114 error

continue is not the last statement of its block

area
parsing (x01xx)
fails the build
yes

continue is followed by more statements in its block. Like break and return, it must be the last statement of its block, because the code after it could never run. Write do continue end to continue from the middle of a block, or put it inside an if.

Example

× failswowlua
for i = 1, 3 do    continue    print(i)end
✓ compileswowlua
for i = 1, 3 do    if i == 2 then continue end    print(i)end

The compiler reports it like this:

error[E0114]: `continue` must be the last statement of its block; write `do continue end`
  ┌─ src/main.wowlua:3:5
  │
3 │     print(i)
  │     ^^^^^ here
codemessage
E0106continue or break outside a loop
E0107continue in a repeat loop whose until condition uses a body local

Offline

terminal
$ wowlua explain E0114
E0114 (error): continue is not the last statement of its block

source on GitHub ↗