Add the EXTERNAL ARRAY command after the LPARAMETERS to let the compiler know that this is an array coming in.
e.g.
LPARAMETERS lpPos, lpVal, lpArray
<b>EXTERNAL ARRAY lpArray</b>
LOCAL iPos, iLen, iStart
If the array originates in the method or function, there will have been a DIMENSION, DECLARE or the array was created in the scope command - e.g., LOCAL laArray(1,1) - so those are recognized as arrays.
The program would work because it know it's an array since it's in memory.
However, since the compiler doesn't follow naming conventions, and VFP doesn't have strong variable typing, and array elements can be accessed the same way function can be called; something extra is needed to indicate to the compiler that the item is an array.
e.g. Which of these is attempting to get the first element from an array and which is passing 2 parameters to a program?
OneThing(1,1)
AnotherThing(1,1)
Insanity: Doing the same thing over and over and expecting different results.