- Thread Author
- #1
So theres a bug that occurs with my bot, i've tried everything to debug it but to no avail. It will just freeze, in the Area "landing". It won't print the message when it's stuck, and it will walk through this location multiple times before freezing. more info: it turns out, it happens ONLY after moving to a new region. only my timer continues to count everything else is frozen.
The one way i can fix this bug, is to restart the bot entirely. So the question is, how can I restart the bot automatically during run time?
If not, maybe someone can highlight something in the code below (i know it looks hacky as fuck but thats not the question! )
EDIT: Realized something NEW
turns out , every time this "stall" occurs and i stop and start the script, i get this printed in the console:
i feel like somehow this will be linked.
This is the problem code:
Then I use this to walk:
The one way i can fix this bug, is to restart the bot entirely. So the question is, how can I restart the bot automatically during run time?
If not, maybe someone can highlight something in the code below (i know it looks hacky as fuck but thats not the question! )
EDIT: Realized something NEW
turns out , every time this "stall" occurs and i stop and start the script, i get this printed in the console:
Code:
Nov 05, 2015 7:58:27 PM com.sun.javafx.css.StyleManager loadStylesheetUnPrivileged
INFO: Could not find stylesheet: file:/C:/Users/Mohsin/RuneMate/temp/SetupDialog.css
i feel like somehow this will be linked.
This is the problem code:
Code:
if (landing.contains(Players.getLocal())) {
if (ChatDialog.getContinue() != null)
ChatDialog.getContinue().select();
System.out.println("I GET STUCK HERE");
// Camera.turnTo(245, 0.485);
if (walkToR(dest1)) {
Execution.delay(200,500);
}
}
Then I use this to walk:
Code:
public boolean walkToR(Area a) {
final Coordinate walk2 = a.getRandomCoordinate();
final RegionPath walking2 = RegionPath.buildTo(walk2);
if (!Players.getLocal().isMoving()) {
if (walking2 != null)
walking2.step(true);
}
return true;
}
Last edited: