You can use a brace "{}" to enclose the script. Then if it doesn't find a peak, it will continue and not end the script.
---------------------------------------
{pkfind iy:=wcol(jj)[80:140] dir:=p method:=first filter:=num value:=1 ocenter_x:=wcol(n+5) ocenter_y:=wcol(n+6);} //This is the problem peak
---------------------------------------
Sam
OriginLab Technical Services