MMTMMT Docs
Diagnostics

C004

key is missing from a frozen map

C004

This key does not exist in the frozen map, so the lookup cannot succeed. Use a key that was present when the map was created, or use a mutable map if keys need to change.

Failing example

script "example"
data chart = subscribe(data.ohlcv)
setup rates = {"usd": 1.0}
on chart.update { let missing = rates["eur"] }

Corrected example

script "fixed"
data chart = subscribe(data.ohlcv)
setup rates = {"usd": 1.0}
on chart.update { let rate = rates["usd"] }

On this page