Jump to content
McKay Development

Dr. McKay

Administrator
  • Posts

    3545
  • Joined

  • Last visited

Everything posted by Dr. McKay

  1. Okay, so there's your problem. As of v4, the first argument in all callbacks is err. Check out the full release notes for all the breaking changes.
  2. timecreated is Unix time, which is the number of seconds that have elapsed since January 1, 1970 00:00:00 (UTC). In JavaScript, Date.now() gives you the current Unix time in milliseconds, so to get the current Unix time in seconds, you'll do Math.floor(Date.now() / 1000). So to get the seconds since the account was created, you'd do Math.floor(Date.now() / 1000) - player.timecreated.
  3. SnaBe is right, you'll want to use the WebAPI. There's no way to get a player's game time from a CM (via node-steam-user), and scraping the web is futile if there's just an API for it.
  4. Chat code will never be ported to node-steamcommunity. The new webchat is just a CM WebSocket connection established using a nonce retrieved from a web API. The same CM WebSocket connection is used by steam-user, so porting it to node-steamcommunity would basically just be copying and pasting all of node-steam-user. I may, in the future, add a way to get the nonce from node-steamcommunity in order to login to node-steam-user, but that's about all that would make sense to be done.
  5. You seem to not have an understanding of how async JavaScript code works. Just because logOn was called doesn't mean you're actually logged on. You need to wait for the loggedOn event.
  6. It doesn't look like you ever logged on.
  7. You are still getting an array. tags: [ [Object], [Object], [Object], [Object] ] is just how console.log represents an array containing 4 objects.
  8. let tag; if ((tag = item.getTag('item_class')) && tag.internal_name == 'item_class_2') { ... }
  9. Please post your solution for others in the future. In this case, the problem was that the first argument to the callback should be err, not offer.
  10. Yes, that's normal. Originally v4 was going to fill in all values not sent by Steam with their defaults (e.g. 0 or empty string) but I decided against that and switched those values back to null (which is how it works in v3). Null means that those values were not sent to us by Steam at all, which is more correct than "assuming" 0 or empty string.
  11. Thanks for the info, that's fixed in beta 5. With beta 5, steam-user v4 is now feature-complete (unless there's something major I missed). Now just waiting on some more thorough testing (please post your bugs!) and for me to finish the new chat docs.
  12. I was unable to reproduce this on the v3 branch, but there is indeed a bug in v4 that prevents sentry files from being appropriately confirmed with Steam. It will be fixed in beta 5 to be published later today, but for the time being if you delete your sentry file and login with v3 and provide an email code, v4 should then work.
  13. CEconItem has a getTag method. Filter your inventory to only items with the tag you're looking for.
  14. This is fixed in beta 4. Thanks for the detailed info.
  15. That looks correct enough, though you should probably also check the tag's category.
×
×
  • Create New...