ding777 Posted September 8, 2018 Share Posted September 8, 2018 (edited) 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 September 8, 2018 by ding777 Quote Link to comment Share on other sites More sharing options...
HeyImJamie Posted September 8, 2018 Share Posted September 8, 2018 Are you planning on showing us some code or? Quote Link to comment Share on other sites More sharing options...
Juggles Posted September 8, 2018 Share Posted September 8, 2018 7 minutes ago, HeyImJamie said: Are you planning on showing us some code or? +1 cant help without code tbh Quote Link to comment Share on other sites More sharing options...
ding777 Posted September 8, 2018 Author Share Posted September 8, 2018 (edited) 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 September 8, 2018 by ding777 Quote Link to comment Share on other sites More sharing options...
dreameo Posted September 8, 2018 Share Posted September 8, 2018 I'm not sure if you have created threads but that's one way of the program 'carrying on' once you've stopped the bot. Don't think you can get much help without posting some source. In any case, I can only imagine the your source is a bit of a mess if you can't debug it yourself. Quote Link to comment Share on other sites More sharing options...
ding777 Posted September 8, 2018 Author Share Posted September 8, 2018 I'm not running threads. There should be no reason it begins to run the script twice, while it's already running. Everything works perfectly fine with no delay to begin with, so that's what is frustrating about this problem. Quote Link to comment Share on other sites More sharing options...
Juggles Posted September 8, 2018 Share Posted September 8, 2018 Use a timer and have it type ./bots in cmd every 2 hours to reset client xD Quote Link to comment Share on other sites More sharing options...
ding777 Posted September 8, 2018 Author Share Posted September 8, 2018 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 Quote Link to comment Share on other sites More sharing options...
Zummy Posted September 8, 2018 Share Posted September 8, 2018 I actually noticed this problem too but only after pausing the script and resuming again. Quote Link to comment Share on other sites More sharing options...
Lemons Posted September 8, 2018 Share Posted September 8, 2018 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. 1 Quote Link to comment Share on other sites More sharing options...
ProjectPact Posted September 8, 2018 Share Posted September 8, 2018 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. Quote Link to comment Share on other sites More sharing options...
liverare Posted September 8, 2018 Share Posted September 8, 2018 (edited) 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 September 8, 2018 by liverare Quote Link to comment Share on other sites More sharing options...
Athylus Posted September 9, 2018 Share Posted September 9, 2018 I've had unexpected behaviour in the past when running the same script on multiple tabs in the same client. Quote Link to comment Share on other sites More sharing options...