Function and no method matching

See Please read: make it easier to help you

In particular, give the entire stacktrace (it should be after the MethodError).