E5003 Runtime Errors

index-out-of-bounds

index outside valid range

When this occurs

`arr[100]` when array has 5 elements

Example error message

error[E5003]: index out of bounds: attempted to access index 100, but valid range is 0-4

How to fix

Ensure your index is within valid range: `0` to `len(array) - 1`.

Related errors