ClosedBit error docs

CB_ERR_UNDECLARED_VALUE

Unknown value or variable. A name was read before it was declared or before a function returned it.

Why it happens

A name was read before it was declared or before a function returned it.

How to fix it

Declare the value before using it, or correct the spelling of the existing variable.

Copy-paste fix pattern
fn main() {
    u256 coins = 250
    println("Coins: " + coins)
    save coins
}
Runtime and Studio now show this kind of page from the error dialog: plain message first, stable code second, original details third.