Jump to content
McKay Development

TeenTechee

Member
  • Posts

    4
  • Joined

  • Last visited

Posts posted by TeenTechee

  1. What exactly is the error message you're getting, and where?

     

    Also, please show the code that is generating and sending this offer.

    function sendTradeOffer(tradeUrl, theirItems, myItems, message, callback){
        var offer = manager.createOffer(tradeUrl);
        
        if(theirItems != null){
            offer.addTheirItems(theirItems);
        }
        
        if(myItems != null){
            offer.addMyItems(myItems);
        }
        
        offer.setMessage(message);
    
        offer.send(function(err, status) {
            if (err) {
                callback(true, "Trade " + err);
            } else {
                callback(false, status);
            }
        });
        
        console.log(offer);
    }
    
    

    The error is "Trade Error: Malformed JSON response" I added trade to the string.

  2. Hi. I was able to send trade offers just fine a while ago, I keep getting errors that this json is malformed. The only malformed parts I find are quotes and commas. What is wrong with this?

    TradeOffer {
      partner: SteamID { universe: 1, type: 1, instance: 1, accountid: 306671577 },
      id: null,
      message: 'Trade Offer WITH Trade Bot',
      state: 1,
      itemsToGive: [ { assetid: '7806227681', appid: 730, contextid: '2', amount: 1 } ],
      itemsToReceive: [ { assetid: '2624718494', appid: 753, contextid: '6', amount: 1 } ],
      isOurOffer: true,
      created: null,
      updated: null,
      expires: null,
      tradeID: null,
      fromRealTimeTrade: false,
      confirmationMethod: null,
      escrowEnds: null,
      rawJson: '' }
    
×
×
  • Create New...