MMTMMT Docs
Diagnostics

P019

loop variables cannot be wrapped in parentheses

P019

Parentheses no longer wrap loop binders. Write for x, y in values directly.

Failing example

script "conf"

state m: map<string, int> = map<string, int>(2)

on chart.update {
  for (k, v) in m {
    let x = v
  }
}

Corrected example

script "fixed"
data chart = subscribe(data.ohlcv)
state values: map<string, int> = map<string, int>(2)
on chart.update { for key, value in values { let item = value } }

On this page