Jump to content

Script stacking somehow


ding777

Recommended Posts

I have a script and it works perfectly fine to begin with, but eventually after its been running for a bit it will start to execute things twice. I can tell it's doing that because the log() messages I have placed throughout the script output twice instead of once. As well as that, it will start to execute tasks poorly and begin to misclick/take longer. 

E.g I have it so it opens packs of items and it works fine, but once this stacking occurs it will click randomly all over the place and misses half the items. 

I'm not sure how this is occuring or how to fix it. Seems like it's executing the script twice. Even if I stop the script and restart it, it can carry over. The most reliable fix has been to shut off the whole client and start again

This is not a sleep error, I have sleeps everywhere. Note, this only occurs after some time has passed it does not occur for the first hour or so that I'm using the script

Edited by ding777
Link to comment
Share on other sites

Not at this moment, I'm wondering if this has occurred for anyone else or if anyone knows any fixes just from reading what I've put.

My script does a lot of things, there would be too much code to paste in the first place.

It basically sets up accounts, then does a specific thing when they are setup all into one script. Does tutorial, levels up, etc

Edited by ding777
Link to comment
Share on other sites

5 hours ago, ding777 said:

I'm under the impression no one's script has ever stacked like this before, since no one seems to know what's going on

 

4 hours ago, Lemons said:

This can happen if you have really long executing loops, the script executor will assume its hung then start a new instance. Most likely its due to the design of your script.

This is most likely your problem, as I’ve experienced it as well. If there are loops, try to get a fail safe in place to make sure you exit the loop.

Link to comment
Share on other sites

Until you show us your code, there's not really much we can do to help troubleshoot the problem.

But I'm guessing you've got a loop in a loop.

  • You're looping through all the packs of item in your inventory and interacting with each one.
  • As time progresses - and maybe Low CPU mode is set - the bot's time to run logic and execute actions are kind of crossing each other.
  • Your bot shoots off an event to open a bunch of items that are no longer present, because at the moment that logic check was performed, it was true.
  • Loops being loops, they don't care for logic and simply does what it's tasked to do before the main script loop can start anew.
  • You're not performing checks inside your loop to ensure items that were valid are still valid before interacting with them.

Show us some damn code.

Edited by liverare
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...