It seems that you have a scalar array but not a scalar function defined? If that is the case then check this post out.