Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚠️ Incorrect function compiling #382

Open
Keller18306 opened this issue Oct 24, 2022 · 1 comment
Open

⚠️ Incorrect function compiling #382

Keller18306 opened this issue Oct 24, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@Keller18306
Copy link

Keller18306 commented Oct 24, 2022

Describe the bug

Incorrect compiling the function with return LuaMultiReturn. Code breaks.

To Reproduce

mtasa.addCommandHandler('anime', () => {
    mtasa.outputChatBox('Nya!')
    const [width, height] = mtasa.guiGetScreenSize()
//code breaks executing
    mtasa.outputChatBox(`${width} - ${height}`)
})

Expected behavior

The code doesn't crash. And at compile time, unpack is not added

Screenshots

image

Desktop information

win11

NPM Version

{
  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'
}

NPM Package versions

test@ C:\MTA Server\server\mods\deathmatch\resources\[ZombiePlague]
├── @typescript-eslint/[email protected]
├── @typescript-eslint/[email protected]
├── @typescript-to-lua/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

Additional context

Without unpack code continue executing without problems

@Keller18306 Keller18306 added the bug Something isn't working label Oct 24, 2022
@Keller18306 Keller18306 changed the title ⚠️ Name of the issue ⚠️ NIncorrect function compiling Oct 24, 2022
@Keller18306 Keller18306 changed the title ⚠️ NIncorrect function compiling ⚠️ Incorrect function compiling Oct 24, 2022
@Keller18306
Copy link
Author

fixed with upgarde to latest TSTL #383

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant