Invalid whole number

Synopsis
Where you were supposed to supply a whole number (ie, integer), you supplied either a non-numeric number, or one containing a fractional component (for example, 1.5).

Cause
You specified a variable name whose value is intended to be the numeric value, but that variable's value is not numeric, or contains a fractional component.

Cure
Make sure the variable's value contains only the digits 0 to 9 (and optionally, a leading minus or plus sign).