ClosedBit error docs

CB_ERR_INDEX_TARGET

Indexed a non-indexable value. Square brackets were used on a value that is not an array or string.

Why it happens

Square brackets were used on a value that is not an array or string.

How to fix it

Only index arrays and strings. Convert the value or choose the correct variable before indexing.

Copy-paste fix pattern
fn main() {
    array scores = [10, 20, 30]
    println(scores[0])
}
Runtime and Studio now show this kind of page from the error dialog: plain message first, stable code second, original details third.