Illegal boolean syntax in if command

Hello LAMMPS users,

I am using the LAMMPS version 29Oct2020. I was using the ‘if’ command in LAMMPS in one of my codes, and I got the error "Illegal boolean syntax in if command ". I had actually followed the way it was given in the LAMMPS documentation for the ‘if’ command, but I still got this error. I have attached a screenshot of the part of the code where the error pops up at. What could be the mistake that I am making? Thank you.

Regards,
Rajesh

Hi. What if you replace typ_nnear by ${typ_nnear} in almost all of your conditions ?