Copy-paste fix pattern
library CB-Math
fn main() {
u256 shift = CB-Math.clamp(300, 0, 255)
save one << shift
}
ClosedBit Docs
ClosedBit error docs
Value out of accepted range. A number, index, shift amount, color, memory cap, or dimension is outside the supported range.
A number, index, shift amount, color, memory cap, or dimension is outside the supported range.
Check the message for the field name and clamp to the allowed range before passing it onward.
library CB-Math
fn main() {
u256 shift = CB-Math.clamp(300, 0, 255)
save one << shift
}