MMTMMT Docs
Diagnostics

T213

multi-return call outside destructure or tail return

T213

A multi-return call can only feed matching destructuring or be forwarded as a tail return. Destructure the results before other use.

Failing example

script "example"
data chart = subscribe(data.ohlcv)
fn pair() -> (int, int) { return 1, 2 }
on chart.update { let value = pair() }

Corrected example

script "fixed"
data chart = subscribe(data.ohlcv)
fn pair() -> (int, int) { return 1, 2 }
on chart.update { let first, second = pair() }

On this page