 <p>When you declare the function you just have to put a simple name without parentheses and parameters otherwise it will give that error.</p> <p><a href="https://i.stack.imgur.com/FDGb5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FDGb5.png" alt="enter image description here"></a></p> <p>See the documentation <a href="http://orientdb.com/docs/2.0/orientdb.wiki/Functions.html" rel="nofollow noreferrer">http://orientdb.com/docs/2.0/orientdb.wiki/Functions.html</a></p>