March 17, 20178 yr In my script I sell a variety of items to a store, sometimes its 5 exactly, but if not then the script will sell until store stock is 5. It does fine usually until it hits a random bump in the road. It seems that sometimes (usually when having to sell x4 items) it'll hang after selling 2-3 and just sit there. I don't think there is anything crazy about the code, but if anyone has suggestions, please lmk. I need this help http://i.imgur.com/w4hHj9c.png Edit: Image link since embed didn't work. Edited March 17, 20178 yr by Polymorphism Image embedding isn't working???
March 17, 20178 yr Any errors in the log? If it stops selling items, this snippet isn't going to give enough information to dissect the issue. I can't see anything wrong with the logic at first glance.
March 17, 20178 yr Author 1 hour ago, Tom said: Any errors in the log? If it stops selling items, this snippet isn't going to give enough information to dissect the issue. I can't see anything wrong with the logic at first glance. Thats the thing, no errors, no visible issues in the code. It just stops in the middle of the selling process. Which should be on the api side since store.sell("item", 4) is whats hanging.
March 17, 20178 yr 22 minutes ago, Polymorphism said: Thats the thing, no errors, no visible issues in the code. It just stops in the middle of the selling process. Which should be on the api side since store.sell("item", 4) is whats hanging. You need to do some debugging to see at which point it is actually hanging. Print out some lines
March 17, 20178 yr Author 26 minutes ago, Tom said: You need to do some debugging to see at which point it is actually hanging. Print out some lines Im thinking its the api itself. Got stuck buying item3 with 1 left to sell http://i.imgur.com/eIXQ9mC.png [INFO][Bot #1][03/17 12:33:22 PM]: Selling 5x item1 [INFO][Bot #1][03/17 12:33:23 PM]: Done sleeping.. [INFO][Bot #1][03/17 12:33:23 PM]: Out of contains [INFO][Bot #1][03/17 12:33:23 PM]: Selling 3x item2 [INFO][Bot #1][03/17 12:33:26 PM]: Done sleeping.. [INFO][Bot #1][03/17 12:33:26 PM]: Out of contains [INFO][Bot #1][03/17 12:33:26 PM]: Selling 3x item3
March 17, 20178 yr Author Yeah ima say its the api and probably submit bug report. I changed up the code to sell 5 if amount is 5, or loop x times and sell 1. This way works just fine without hanging whatsoever. http://i.imgur.com/Rr6iHKQ.png
March 17, 20178 yr Use logs to see what is returning true To see if it is going to the part Edited March 17, 20178 yr by Juggles
March 17, 20178 yr Author 5 minutes ago, XmQ said: Perhaps the condition is nulling. Which condition?? I see no reason for any conditions to be null as I am careful to not create NPEs in my code. If there is a NPE, then it must be suppresed somehow and its on the bot side of things
March 20, 20178 yr I was also trying to use Store.sell() about a month ago for a script and gave up because I was having problems with it too
March 20, 20178 yr 18 minutes ago, d0zza said: I was also trying to use Store.sell() about a month ago for a script and gave up because I was having problems with it too You can use inventory.interact instead
March 20, 20178 yr Author 1 hour ago, Juggles said: You can use inventory.interact instead I tried that and it never once tried interacting with the inventory to sell
Create an account or sign in to comment