Because you have an extra, unneeded comma. Remove the comma and the code should look like this:
var %nick = $nick(%chan,0,a,ohv)
On a side note, you should add:> ~&after the letter v so it excludes admins and owners.