Jump to content
McKay Development

Offer hasnt created, because items is null!


Risse

Recommended Posts

hi, yesterday everything worked fine, it was possible to update the library and change the necessary parameters to add the skin to the exchange offer? I'm sure the assetid is correct, so that's definitely not the reason. Tell me, please, before that the script worked for 4 months
========

let offer = manager.createOffer(trade_url_bd);
offer.addMyItems([]);
offer.setMessage("Trade #"+trade_id);
for(let i = 0; i < skins.length; i++) {
let assetid = skins[i];
offer.addTheirItem({"appid":"730","contextid":2,"assetid":assetid});
}
 
offer.send(function(err, status) {
  console.log(status)
  if (err) {
    console.log(err)
    poolMore.query("UPDATE `orders` SET `status` = 'error' WHERE `orders`.`id` = "+trade_id+"; ", function (error, results){
    if(error){
      console.log(error);
    }
});
}
if (!status) {
  console.log(`Offer hasnt created, because items is null!`);
  poolMore.query("UPDATE `orders` SET `status` = 'error', `bot_name` = '"+botNAME+"', `bot_lvl` = '0', `bot_img` = '"+botIMG+"', `show_notif` = '1', `steam_trade_id` = "+offer.id+" WHERE `orders`.`id` = "+trade_id+"; ", function (error, results){
  if(error){
    console.log(error);
  }
 });
}
else {
  console.log(`Offer #${offer.id} sent successfully`);
  poolMore.query("UPDATE `orders` SET `status` = 'wait', `bot_name` = '"+botNAME+"', `bot_lvl` = '0', `bot_img` = '"+botIMG+"', `show_notif` = '1', `steam_trade_id` = "+offer.id+" WHERE `orders`.`id` = "+trade_id+"; ", function (error, results){
  if(error){
     console.log(error);
  }
 });
}
                                });

 

image.png.a1e449cee88c4232ca13072b7a92760b.pngimage.png.d62e218a8411ff5df6c0e9aedf510546.png

Edited by Risse
Link to comment
Share on other sites

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...