Jump to content
McKay Development

How to "accept" receiving new items in TF2?


Robert Lutece

Recommended Posts

Upon accepting a trade offer, my bot's inventory is sorted by class (presumably: tf2.sortBackpack(0)).

However, as you can see in the picture, it is only partially sorted, possibly because I am not "acknowledging" the new items and they do not behave normally.

I can find no other explanation - I have tried everything. Please, help me.

wrongSort.png

Edited by Robert Lutece
clarification
Link to comment
Share on other sites

2 hours ago, Dr. McKay said:

Acknowledging a received item is done by simply moving it to a backpack slot using setPosition or by sorting your backpack again using sortBackpack. sortBackpack only sorts your backpack once; it won't stay sorted when you receive new items.

I use the sortBackpack() method after every time a trade offer is accepted. In fact, since it doesn't seem to work for me, I execute the code several times.

sortBackpack(n = 0) is the closest thing to "sort by class" in the range n = [0, 5], so I feel like I am not acknowledging the new items. What am I missing?

Edited by Robert Lutece
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...