Robert Lutece Posted June 5, 2023 Report Posted June 5, 2023 (edited) 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. Edited June 5, 2023 by Robert Lutece clarification Quote
Dr. McKay Posted June 6, 2023 Report Posted June 6, 2023 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. Robert Lutece 1 Quote
Robert Lutece Posted June 6, 2023 Author Report Posted June 6, 2023 (edited) 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 June 6, 2023 by Robert Lutece Quote
Recommended Posts
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.