E3004 Types Errors

Types

strings are not element-assignable; individual string characters cannot be modified by index

When this occurs

Assigning wrong type to string index

Example error message

error[E3004]: can only assign character to string index, got INTEGER

How to fix

The assigned value must match the array's element type.

Related errors