ClosedBit error docs

CB_ERR_WINDOW_REQUIRED

Window required first. A draw or input operation ran before a window existed.

Why it happens

A draw or input operation ran before a window existed.

How to fix it

Call init_window before draw, input, and present-style operations.

Copy-paste fix pattern
library CB-Render

fn main() {
    init_window(640, 360, "Window first")
    draw_text(24, 24, "Ready", 0xFFFFFF, 24)
    swap_buffers_fast()
}
Runtime and Studio now show this kind of page from the error dialog: plain message first, stable code second, original details third.