Jump to content
McKay Development

[Question] node-globaloffensive


Henrykvdb

Recommended Posts

I'm sorry if this question is a bit nooby but I was wondering what I am doing wrong.

 

I'm trying to use you're node-steam-user library and your node-globaloffensive library. And steamUser.on (see my code) won't give the connectedToGC event, and my IDE (webstorm) won't let me do csgo.on without giving me an error so I'm unsure where I need to listen for the connectedToGC event.

 

Here's my code with the unnecessary parts cut out: https://gist.github.com/henrykvdb/64003c7104c4157204c46d1824bc3357 (I removed the shared_secret & password out of the gist for obvious reasons.

 

 

Link to comment
Share on other sites

Okay I've been looking for how to fix it all day long and couldn't find it. After trying what you said I can confirm that was indeed the problem.

Now my code is fully functional but for some reason webstorm still says that csgo.on is undefined, any idea why? (it's strange because it does trigger when the 'connectedToGC' event is emit.

 

https://gist.github.com/henrykvdb/401a6c3f543afdd89c4886ca9ead0d47

 

PS: Also .getSteam3RenderedID() is underlined with the message that it's an unresolved function or method, wich is also strange since its working perfectly fine.

Edited by Henrykvdb
Link to comment
Share on other sites

Yes I do.

 

Also, I ran into some issues trying to make make a custom request simular to the requestLiveGames request in your node-globaloffensive library.

 

I added this: https://gist.github.com/henrykvdb/6ee2d8bd8e58246f023ae2a57df12800 to the globaloffensive\index.js file (this is also where the globaloffensive.prototype.requestLiveGames is located.

 

And I also added this: https://gist.github.com/henrykvdb/91e556493b9d18dd5b2e93270780d46e to the globaloffensive\handlers.js file (same place as the handler for the globaloffensive.prototype.requestLiveGames is located)

 

But I'm pretty sure I messed up the syntax or some other part of the code somewhere wich causes it to crash.

You'll probably see my mistake pretty easilly but here's the crash log anyways: https://gist.github.com/henrykvdb/9b46eab5852a05c6bc4a680f1edff403 

 

PS: The line that makes the code crash is csgo.custom("2943920796","7253158134192955045","1467397635166412633")

Edited by Henrykvdb
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...