An array is declared with a fixed size written in square brackets, and that size is a count of slots, so it must be a whole number greater than zero:
Example
mut numbers: int[5]; // five slotsThese are rejected:
Example
mut empty: int[0]; // an array with no slots can hold nothingmut negative: int[-3]; // you can't have -3 slotsmut half: int[2.5]; // slots come in whole numbersThe size can also come from a literal: mut nums: int[] = [1, 2, 3]; is exactly int[3]. An empty literal has no size to give, so it is the same mistake:
Example
mut a: int[] = []; // 'a' has no size -- an array needs at least one elementGive it at least one element, or write the size yourself (mut a: int[5];).
If you don’t know how many items you will need in advance, an array is the wrong tool: List<T> (from import list;) grows as you add to it.
Run turf --explain E123 in a terminal to read this again.