Jump to content

Store#sell() hanging when selling items x1


Polymorphism

Recommended Posts

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.

 

w4hHj9c.png

w4hHj9c.png

Edited by Polymorphism
Image embedding isn't working???
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

 

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...