errors and warnings / parsing / E0119
E0119 error
export local without an initializer
- area
- parsing (x01xx)
- fails the build
- yes
An export local has no initializer. Exported bindings can't be assigned
after their declaration (E1010), so the value must be given where it is
exported. For state that changes, export a table and change its contents.
Example
export local count: numberexport local count: number = 0The compiler reports it like this:
error[E0119]: `export local` needs an initializer ┌─ src/main.wowlua:1:1 │ 1 │ export local count: number │ ^^^^^^^^^^^^^^^^^^^^^^^^^^ here
Related codes
| code | message |
|---|---|
| E1010 | Assignment to an exported or imported binding |
Offline
$ wowlua explain E0119 E0119 (error): export local without an initializer