ClosedBit error docs

CB_ERR_UNDECLARED_VALUE

Unknown value or variable. A name was used before it was declared or returned by an allowed function.

Why it happens

A name was used before it was declared or returned by an allowed function.

How to fix it

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

Copy-paste fix pattern
fn main() {
    u256 coins = 250
    save coins
}
If the IDE reports a line number, fix that line first, then scan the previous line for an unclosed string, bracket, or block.