Jump to content
McKay Development

SimpleThings

Member
  • Posts

    23
  • Joined

  • Last visited

Posts posted by SimpleThings

  1. It deleted like 10 of my items. I have no idea where they are, because fromitemid and toitemid were exactly the same. I have no idea if i can get these items back, but people should be aware of it.

    I created a function to stack the items, but i had a small bug where i did not put if(fromItem != toItem) and yeah.. that happened.

  2. Mr. Kay, do you have any idea how i can stack these items, getting them by my inventory. 
    Example: 

    CEconItem {
        id: '3387261523668970097',
        amount: 3,
        market_hash_name: 'Blue Bandana',
    },
    CEconItem {
        id: '3387261523668970097',
        amount: 1,
        market_hash_name: 'Blue Bandana',
     },
    CEconItem {
        id: '3387261523668970097',
        amount: 1,
        market_hash_name: 'Blue Bandana',
     },
     CEconItem {
        id: '3387261523668970092',
        amount: 1,
        market_hash_name: 'Yellow Bandana',
     },
     CEconItem {
        id: '3387261523668970092',
        amount: 3,
        market_hash_name: 'Yellow Bandana',
      }
        

    Because on this post method i can only post one assetid in From and To variables, but what if the items are more than 2, such as in this situation above.

    I'd like to get a result such as:
     

    CEconItem {
      id: '3387261523668970097',
      amount: 5,
      market_hash_name: 'Blue Bandana',
    },
    CEconItem {
      id: '3387261523668970092',
      amount: 4,
      market_hash_name: 'Yellow Bandana',
    }
        

    Thanks in advice.

  3. Yeah, im using 2 bots for trading, one for storage and one which is used for the withdraws/deposits in one file. They are sending offers each other. If i take amount 2 by item with amount 10 (10 stacks) there will be 2 items with amounts 2 and 8, but i cant really group them back. Thats the point.

    I guess they have tons of these items in stacks and they are just giving prizes by names and not assetids. No idea how they do it, but yeah. Lets say i deposited 10 items with different asset ids, if i win, they are giving me item with one asset id and amount 10. I guess im rly SOL

    Still thanks for your help dude. Best of luck and stay safe!

  4. God damn it, i just lost the offer of the user and i can't resend it now. What would you recommend me Mr. Kay?

    my console log:

    data:    tradebot.js:28916 - Processing offer  #4268805339 from XXXXXXXXXXXXXXX
    data:    tradebot.js:28916 - Withdraw needs Confirmation!
    data:    tradebot.js:28916 - Offer confirmed
    data:    tradebot.js:28916 - [STORAGE] Offer #4268805339 is Accepted
    data:    tradebot.js:28916 - Sending offer to tradebot, then to user!
    data:    tradebot.js:28916 - No more offers. Offers: 0
    data:    tradebot.js:28916 - Sending offer to user!
    data:    tradebot.js:28916 - 3306165020049247722 deleted
    data:    tradebot.js:28916 - 3306165020049247584 deleted
    data:    tradebot.js:28916 - 3306165020049247646 deleted
    data:    tradebot.js:28916 - 5fS4kl5_
    data:    tradebot.js:28916 - Creating offer for user XXXXXXXXXXXXXXX!
    data:    tradebot.js:28916 - getUserDetails Error:Error: Malformed response // If err => return the withdrew items back to the site's inventory. 
    data:    tradebot.js:28916 - RETURNING
    data:    tradebot.js:28916 - Adding
    data:    tradebot.js:28916 - Adding
    data:    tradebot.js:28916 - Adding
    data:    tradebot.js:28916 - Send items to bot!
    data:    tradebot.js:28916 - [Trade return error] Error: Not Logged In
    data:    tradebot.js:28916 - [TradeBot] The Bot has logged in!
    data:    tradebot.js:28916 - [TradeBot] The Bot has logged in!

    Should i save the new assetids and resend the offer after some time for example with these items, or .. i don't know what to do :(

    Im using one file with 2 bots, one for trading and one storage. But sometimes weird errors are coming by... do you think that i need to save the items in some array in my sql table? Because all  i do now is get the items by offer.id 

    And by the way, the items were stuck into the trading bot, they couldnt move to the storage.

  5. Hello. I've seen many topics about offer.getUserDetails, but i can't understand how it works. All the time i try to send offer to a user that has no mobile steam guard or wrong token for example, im getting error, thrown by getUserDetails, but i can't get the type of this error. For example:
     Error: There was an error sending your trade offer.  Please try again later. Username is not available to trade. More information will be shown to Username if they invite you to trade.

    Or (wrong token):  Error: Trade Offers can only be sent to friends.  Username is not on your Steam friends list.

    I want to catch that error and show the user what the problem is, like 

    if(err){
     if(err.type == "not_friends") 

     console.log("Check your tradelink!");

    else if(err.type == "no_mobile")

     console.log("Please use mobile steam guard auth in order to receive offers.");
    }

    If there is other way than the one im using, please share. 

    Im currently using:

    var SendToUser = manager.createOffer(row[0].userid);

    SendToUser.getUserDetails(function(err, me, them) {
                    if (err) {
                        console.log("getUserDetails Error:" +err);
                        return;
                    }

       //...

    });

×
×
  • Create New...