Jump to content
McKay Development

pumble

Member
  • Posts

    9
  • Joined

  • Last visited

Posts posted by pumble

  1. offer object and the id are provided correctly... for some reason the id of the offer is null.

     

    function sendOffer(offer, id){
    offer.setMessage("xxx");
    offer.send();
    var oid = offer.id;
    updateTrade("send", id, oid);
    console.log(oid);
    }
    
     
    function updateTrade(status, id, offerId){
    mysqlConnection.query('UPDATE trades SET status = "'+ status +'", offerId = "'+ offerId +'" WHERE id = ' + id, function(err, row, fields) {
    if(err){
    console.log(err);
    return;
    }
    });
    console.log("Trade Offer Done");
    
  2. Hey Guys,

     

    i run into a very simple problem but cant find a solution for it.

    during my creation process for the trade offer, i run a kind of loop and insert each item single into the trade offer object.

    the problem behind is, after ive added a item (e.g. a cs:go case) and in a other round of inserting i add the same case again the object "fails" to insert it, since its allready in it.

     

    the solution should be to increase the amount of it.

    and theres where i cant find a solution for, since its not only to increase it to 2..

    it could also be 3-xxxx .

     

    is there any way to recieve the amount of the item allready in the "offer object" so i can increase this directly or remove the item and insert it with a higher amount then ?

     

     

     

     

    p.s.

    sry for a non nativ english ;) tried my best :P

×
×
  • Create New...