Can't modify logical and (&&) in scalar assignment line 38 near ") " syntax error at line 42, near "+}" syntax error at line 46, near "}" You aren't allowed to assign to the item indicated, or otherwise try to change it.