TeenTechee Posted November 4, 2016 Report Posted November 4, 2016 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: '' } Quote
Dr. McKay Posted November 4, 2016 Report Posted November 4, 2016 What exactly is the error message you're getting, and where? Also, please show the code that is generating and sending this offer. Quote
TeenTechee Posted November 4, 2016 Author Report Posted November 4, 2016 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. Quote
Dr. McKay Posted November 5, 2016 Report Posted November 5, 2016 Are you sure that you're logged in? Also, are you up to date? Quote
TeenTechee Posted November 5, 2016 Author Report Posted November 5, 2016 Are you sure that you're logged in? Also, are you up to date? Logged in yes for sure, let me check up to date Quote
TeenTechee Posted November 5, 2016 Author Report Posted November 5, 2016 Are you sure that you're logged in? Also, are you up to date? Updated and it worked. Now Im getting an error #15 Quote
Recommended Posts
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.