Jump to content
McKay Development

Recommended Posts

Posted


steamUser.on('tradeOffers', function(c){
manager.getOffers(TradeOfferManager.EOfferFilter.ActiveOnly, function(err, sent, received){
if(err){
console.log(err);
return;
}
received.forEach(function(offer){
console.log(offer.isGlitched());
var money_give = 0;
if(!offer.itemsToGive){
offer.decline();
return;
}
console.log(offer.itemsToGive);
offer.itemsToGive.forEach(function(item){
console.log(item.market_hash_name);

market.getItemPrice(730, item.market_hash_name, function(err, data){
if(err){
console.log(err);
return;
}
money_give += data.lowest_price;
console.log(money_give);
},9);
});
});
});
});


 

What is wrong with this snippet? 

 

The item object's market_hash_name is returning undefinded. Any reason for why that might be? - https://github.com/DoctorMcKay/node-steamcommunity/wiki/CEconItem#market_hash_name 

 

 

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...