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
for i = 1, 3 do continue print(i)endfor i = 1, 3 do if i == 2 then continue end print(i)endThe 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
Related codes
| code | message |
|---|---|
| E0106 | continue or break outside a loop |
| E0107 | continue in a repeat loop whose until condition uses a body local |
Offline
$ wowlua explain E0114 E0114 (error): continue is not the last statement of its block