Open Keller18306 opened 1 year ago
Incorrect compiling the function with return LuaMultiReturn. Code breaks.
LuaMultiReturn
mtasa.addCommandHandler('anime', () => { mtasa.outputChatBox('Nya!') const [width, height] = mtasa.guiGetScreenSize() //code breaks executing mtasa.outputChatBox(`${width} - ${height}`) })
The code doesn't crash. And at compile time, unpack is not added
unpack
win11
{ npm: '8.12.1', node: '16.15.1', v8: '9.4.146.24-node.21', uv: '1.43.0', zlib: '1.2.11', brotli: '1.0.9', ares: '1.18.1', modules: '93', nghttp2: '1.47.0', napi: '8', llhttp: '6.0.4', openssl: '1.1.1o+quic', cldr: '40.0', icu: '70.1', tz: '2021a3', unicode: '14.0', ngtcp2: '0.1.0-DEV', nghttp3: '0.1.0-DEV' }
test@ C:\MTA Server\server\mods\deathmatch\resources\[ZombiePlague] ├── @typescript-eslint/eslint-plugin@4.33.0 ├── @typescript-eslint/parser@4.33.0 ├── @typescript-to-lua/language-extensions@1.0.0 ├── eslint@7.32.0 ├── mtasa-lua-types@1.1.0 ├── mtasa-lua-utils@1.0.4 ├── prettier@2.7.1 ├── typescript-to-lua@1.3.4 └── typescript@4.5.5
Without unpack code continue executing without problems
fixed with upgarde to latest TSTL #383
Describe the bug
Incorrect compiling the function with return
LuaMultiReturn
. Code breaks.To Reproduce
Expected behavior
The code doesn't crash. And at compile time,
unpack
is not addedScreenshots
Desktop information
win11
NPM Version
NPM Package versions
Additional context
Without
unpack
code continue executing without problems