Jump to content
McKay Development

client.friends fix


African

Recommended Posts

Hello all,

 

I just finished working on a bot using this tutorial. After trying to use it I noticed from debugging this:

Exception has occurred: Error
TypeError: Cannot read property 'on' of undefined
    at Object.<anonymous> (c:\node\tradebot.js:127:15)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Timeout.Module.runMain [as _onTimeout] (module.js:604:10)
    at ontimeout (timers.js:386:14)
    at tryOnTimeout (timers.js:250:5)
    at Timer.listOnTimeout (timers.js:214:5) 

Here is the code causing the error.

client.friends.on('relationships', function(){ 

After closely looking at the comments in the guide I saw McKay said this:

 

 

 

client.friends was removed in node-steam-user v2.0.0. You’ll want the newest v1.x.x, which is 1.13.0.

 So to fix the issue do I download the github repo for steam-user and override mine with the 1.13.0 version?

 

Otherwise how would you go about doing things involving friends without using client.friends.on() ?

 

 

Thanks for your time and help

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...