>So I should define 5 parameters in LPARAMETERS so I could then go to line IF and see if there is a too much parameters and deal with that 'error' on my own?
That would very much depend on what you want.
Do you want 5 parameters, and need them in some cases? Then define the additional parameters.
Do you really only need, for instance, 3 parameters? Then you should always call the function with 3 parameters or less. Also, you should be happy that Visual FoxPro a. catches your programming error in the first place, and b. gives you such a clear error message.
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)