This message is generated when the second argument in NMinimize or NMaximize is not a list of valid variables or a list of valid variables with upper and lower bounds for each variable.
Symbols and expressions that do not have some other meaning are usually valid variables. Numbers, strings, lists, inequalities, sums, powers, and products are not valid variables.
Upper and lower bounds for a variable are specified using a list, such as {x,1,2}.
Off[message] switches off the message; On[message] switches it on. For example: Off[NMinimize::lvar].