budysvk Posted May 20, 2017 Report Posted May 20, 2017 Hello. Can you help me please? I have a problem with checking tradeoffer stateThis is what i use var tid = req.query['tid']; offers.getOffer({ tradeofferid: tid }, function(err, trade) { if(err) { logger.error('Error checking trade'); logger.debug(err); res.json({ success: false, error: err.toString() }); } else { if(trade.response.offer.trade_offer_state == 3) { res.json({ success: true, action: 'accept', result: 'Success' }); } else if(trade.response.offer.trade_offer_state == 7) { res.json({ success: true, result: 'Declined', action: 'cross' }); } else { res.json({ success: false, error: 'Not Accepted Yet' }); } } }); And it always gives me error: TypeError: Cannot read property 'trade_offer_state' of undefined but it is defined in your documentation.Thanks. Quote
Dr. McKay Posted May 21, 2017 Report Posted May 21, 2017 Wrong module. This isn't node-steam-tradeoffers. 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.