Inconsistency between function definition and error message when trying to execute it through truffle console

You can install truffle locally rather than globally, which could make your life easier.