This error message appears in the Kernal Gridding window when Auto On is turned off. You must change the grid spacing, grid lines, and/or grid length such that the relationship ([lines-1]*[spacing] = grid length) is maintained.
Alternatively, turn Auto On so that the grid spacing, grid lines, and/or grid length are automatically adjusted to maintain this relationship when one or more of the parameters are modified.