Error reports don't indicate the error where the actual error is, but where the Torquescript parser realized there was a problem
Syntactically, there's nothing wrong with that line, so the error is somewhere before that
However, unless %client is already defined as the name, you need to use %client.getPlayerName()