Jump to content
McKay Development

Recommended Posts

Posted

When i send chat command to activate this I get error which i dont know to fix. If i leave just my item  it is same.

 

D:\Radna površina\bot\node_modules\steamcommunity\components\users.js:342
                                callback(null, inventory, currency);
                                ^

TypeError: callback is not a function
    at SteamCommunity.<anonymous> (D:\Radna površina\bot\node_modules\steamcommunity\components\users.js:342:5)
    at Request._callback (D:\Radna površina\bot\node_modules\steamcommunity\components\http.js:67:15)
    at Request.self.callback (D:\Radna površina\bot\node_modules\request\request.js:185:22)
    at Request.emit (events.js:182:13)
    at Request.<anonymous> (D:\Radna površina\bot\node_modules\request\request.js:1157:10)
    at Request.emit (events.js:182:13)
    at IncomingMessage.<anonymous> (D:\Radna površina\bot\node_modules\request\request.js:1079:12)
    at Object.onceWrapper (events.js:273:13)
    at IncomingMessage.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1081:12)

D:\Radna površina\bot>pause
Press any key to continue . . .

D:\Radna površina\bot>pause
Press any key to continue . . .

 

code:

if(numberOfKeys > 10) { client.chatMessage(steamID, "You cannot buy that much"); }
                else {
                     var offer = manager.createOffer(steamID);
                     manager.loadInventory(753, 6, true, function(err, myItems) {
                            itemx = {
                                appid: 304930,
                                contextid: 2,
                                amount: 1,
                                assetid: '646664519304758668'
                            }
                            offer.addMyItem(itemx);
                            offer.loadPartnerInventory(753, 6,true, function(err, theirItems) {
                                if(err) {
                                console.log(err);
                                return;
                                        }
                            itemy =
                            {
                            appid: 753,
                            contextid: 6,
                            amount: 1,
                            assetid: '1922357299630920400'
                            }
                            offer.addTheirItem(itemy);
                            offer.send("");
                            });
                            });
                    
                    client.chatMessage(steamID, "Processing");
                }

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