Jump to content
McKay Development

timgfx

Member
  • Posts

    84
  • Joined

  • Last visited

Posts posted by timgfx

  1. No, the original post code is crashing due to some bug that I need to track down.

     

    What kind of chat is this? Group chat or multi-user? Also, is the chatEnter event being emitted for it? Can you also listen for chatLeft and see in what order stuff is being emitted?

    Multi user I think, the bot invites a user and me. Currently the bot doesn't listen for chatEnter and chatLeft. Only chatUserJoined and charUserLeft, they are both emitted and leaveChat() causes an error in chatUserLeft. I can test chatEnter and chatLeft later today, does steam-user have a debug mode?
  2. Well the error in that screenshot you just provided is caused by you attempting to leave a chat when you aren't connected to Steam.

     

    When you say it happens "every time", it happens every time what happens? Every time someone leaves a chat?

    In the code I posted in the original post it would crash every time a user left a chat.

     

    So that means my session expired?

  3. Hello!

     

    I keep getting an error when I'm doing:

     

    manager.getEscrowDuration('76561198016511109', 'EMv1iKH8', function(err, daysTheirEscrow, daysYourEscrow) {

    if(err) console.log(err);

    });

     

    And getting: Error: This Trade URL is no longer valid for sending a trade offer to noname.

    But the funny thing is that https://steamcommunity.com/tradeoffer/new/?partner=324417112&token=EMv1iKH8 tradeurl works fine

     

    What am I suppose to do?

     

    Thanks!

    http://prntscr.com/br40ch

  4. As per the documentation, you need to pass the actual function that you want to remove as a listener to removeListener.

    I tried that but it didn't work

     

    I did this: 

    client.on("loggedOn", function(details, parental) {
                logonfunc(details, parental);
            });
    
            client.removeListener("loggedOn", function(details, parental) {
                logonfunc(details, parental);
            });
    

    And tried the same with removing the logonfunc function. How would I do it because I'm lost

  5. then loop through itemsToReceive and validate each market_hash_name

    Yep I figured it out already. It's too much to explain tho and was a lotta copy pasting. And I didn't use JSON since I like using Javascript objects more. Dunno why, more familiar with it I guess. This is my trades.js file now:

    module.exports = {
    	trade1: {
    		"itemsToReceive": "",
    		"itemsToGive": ""
    	},
    	trade2: {
    		"itemsToReceive": "",
    		"itemsToGive": ""
    	},
    	trade3: {
    		"itemsToReceive": "",
    		"itemsToGive": ""
    	},
    	trade4: {
    		"itemsToReceive": "",
    		"itemsToGive": ""
    	},
    	trade5: {
    		"itemsToReceive": "",
    		"itemsToGive": ""
    	},
    	trade6: {
    		"itemsToReceive": "",
    		"itemsToGive": ""
    	},
    	trade7: {
    		"itemsToReceive": "",
    		"itemsToGive": ""
    	},
    	trade8: {
    		"itemsToReceive": "",
    		"itemsToGive": ""
    	},
    	trade9: {
    		"itemsToReceive": "",
    		"itemsToGive": ""
    	},
    	trade10: {
    		"itemsToReceive": "",
    		"itemsToGive": ""
    	}
    }
    
    //all values represent the market_hash_names of the item
    
×
×
  • Create New...