1

I'm getting this error on "callback", this is the only part of the code where I use it. Thanks.

throw new TypeError('"callback" argument must be a function');

Error and code: https://pastebin.com/tbfdMdEK

Thank you!

2
  • try this client.chatMessage(steamID, Config.options.successMessage, callback); Commented Jun 30, 2017 at 23:03
  • Somewhere you are supposed to be passing a function for a callback, but you are either not passing that argument at all or you are passing something that is not a function. We'd have to see a lot more code to know where that error is. Typically, you would start at the exact source line of the exception and work up the call stack until you find a line of your code that is passing the wrong arguments. Commented Jun 30, 2017 at 23:48

1 Answer 1

3

On the following line you should probably pass a reference to callback instead of calling it.

Instead of this:

client.chatMessage(steamID, Config.options.successMessage, callback());

Do this:

client.chatMessage(steamID, Config.options.successMessage, callback);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.