MMTMMT Docs
Diagnostics

T211

wrong number of return values

T211

A return gives a different number of values than the function declares, or a handler returns a value. Return exactly the declared values; handlers return nothing.

Failing example

script "conf"

data chart = subscribe(data.ohlcv)

on chart.update {
  return 1
}

Corrected example

script "fixed"
fn value() -> int { return 1 }

On this page