ClosedBit error docs

CB_ERR_OVERFLOW

u256 overflow. A checked unsigned 256-bit result exceeded the maximum allowed value.

Why it happens

A checked unsigned 256-bit result exceeded the maximum allowed value.

How to fix it

Use smaller operands, clamp before the operation, or switch to a design that stores multiple values instead of one overflowing lane.

Copy-paste fix pattern
library CB-Math

fn main() {
    u256 value = CB-Math.min(max, 1_000_000)
    save value
}
If the IDE reports a line number, fix that line first, then scan the previous line for an unclosed string, bracket, or block.