Cause
This error occurs if the length of a primitive type variable is not positive. The following code fragment shows this error.
vars maxLength = 50; constants s: String[MaxLength-100]; // error: negative length not valid
Action
Change the length to a positive integer value.