Jump to content
McKay Development

Dr. McKay

Administrator
  • Posts

    3660
  • Joined

  • Last visited

Everything posted by Dr. McKay

  1. item.actions is an array. You need to find the action you want.
  2. Assuming steamid is a variable holding a valid SteamID, then [steamid] is correct as that's creating an array with one element. It's also important to note that you cannot pass a SteamID like var steamidstolookup = [76561198006409530]; Numbers in JavaScript are double-precision floating-point numbers, which have a maximum integer precision up to 2^53. A 64-bit SteamID is greater than this, so trying to pass it as a number and not a string will cause it to become some other number entirely. For example:
  3. Maybe there's been a change to how the process works and I need to update the code. I'll see when I can find time.
  4. I'd like to help, but I haven't touched SourceMod in years so I can't, sorry.
  5. You would have to find the modified version of the plugin, or find someone who can modify it for you.
  6. I'm pretty sure that means that you need to verify your email before continuing. You can request a verification email with steam-user.
  7. You should create a new SteamCommunity instance for each account, in which case they don't share anything except your IP address, unless you're using proxies.
  8. @What Comes Around is right, in that case only the last if has the else attached to it. You'd want to either use a switch (preferred in this case), or a chain of else if.
  9. You were missing a single-quote after !Hello, and in both you're missing a closing paren. I don't see any reason why that would send back both messages; you should probably console.log the message to see what it actually is; you might be receiving another message of some type in addition to your !Hello.
  10. The brackets just mean that it's an optional argument. store.addPhoneNumber('+310***', (err) => {}) is the same as store.addPhoneNumber('+310***', false, (err) => {}). If you want to bypass a confirmation, you'd do store.addPhoneNumber('+310***', true, (err) => {}) The callback doesn't have any other arguments besides err.
  11. That code is full of syntax errors, so I suspect you didn't copy and paste the code that's actually running. client.chat.on('friendMessage', (msg) => { if (!msg.message_bbcode_parsed) { return; } let element = msg.message_bbcode_parsed[0]; if (typeof element == 'object' && element.tag == 'tradeoffer') { client.chat.sendFriendMessage(msg.steamid_friend, `You sent me trade offer #${element.attrs.id}.`); } });
  12. Sorry, that's probably not going to be implemented.
  13. Have you read the docs on the new chat? You get a friendMessage event when a new message comes in, which contains an Incoming Friend Message object. For an incoming trade offer, the message is something like: [tradeoffer sender=46143802 id=4087685841][/tradeoffer] But you can see the parsed BBCode in a more convenient format with message_bbcode_parsed, which looks like: [ TagNode { tag: 'tradeoffer', attrs: { sender: '46143802', id: '4087685841' }, content: [] } ]
  14. You can either listen for the tradeOffers event, or listen for chat messages and check for one that contains a [tradeoffer] BBCode.
  15. GC sessions are weird and sometimes they go away without wanting to reconnect. That said, some changes have been made somewhat recently, so make sure you're up to date. If you are, then I suggest detecting when that happens, and using gamesPlayed([]) then waiting a minute or two and launching CS:GO again.
  16. It couldn't be, that error is coming from somewhere else. But that error is definitely indicating that you're trying to reference eresult on something that's null.
  17. Glad you got that sorted!
  18. This means that err is null, meaning there was no error.
  19. err.eresult is just the number, yes.
  20. Is your inventory full, or would accepting the offer put your inventory over the limit?
  21. Node.js actually performs better if you split as much as you can into separate processes, since Node is single-threaded.
  22. getPersonas is a method, not a property.
  23. You don't need to load someone's inventory if you know the asset ID you plan on putting in the trade offer already. Can you determine which line you're receiving the error on? That error could be coming from either manager.loadInventory or manager.loadUserInventory.
  24. You need to wait for the loggedOn event, and you also need to call getPersonas to actually get user persona data.
  25. What's the purpose of loading the user's inventory if you aren't doing anything with the response? Also, I'd like to know what your partner variable actually looks like.
×
×
  • Create New...