v0.13.7
errors and warnings / parsing

errors and warnings / parsing / E0116

E0116 error

Unbalanced } in an interpolated string

area
parsing (x01xx)
fails the build
yes

A backtick string contains a } that doesn't close an embedded {…} expression. Write \} for a literal closing brace (and \{ for an opening one).

Example

× failswowlua
local count = 3print(`count} items: {count}`)
✓ compileswowlua
local count = 3print(`\{count\} items: {count}`)

The compiler reports it like this:

error[E0116]: unbalanced `}` in an interpolated string; write `\}` for a literal brace
  ┌─ src/main.wowlua:2:13
  │
2 │ print(`count} items: {count}`)
  │             ^ here
codemessage
E0105Invalid escape in a backtick string
E0102Unterminated string or long bracket

Offline

terminal
$ wowlua explain E0116
E0116 (error): Unbalanced } in an interpolated string

source on GitHub ↗