- Thread Author
- #1
Ok so im stuck, cant for the life of me get this to work. I am trying to change a string in my main class(treebot) from a LeafTask. Its doing my head in.
I tried to change it directly by implimenting a comman in the Leaftask-
new Cru5tyBot().status = ("Doing stuff...");
Didnt work!
In my main class I created a method to change it internaly -
public class Cru5tyBot extends TreeBot implements EmbeddableUI {
public String status = "Starting...";
public void updateStatus(String newStatus) {
this.status = newStatus;
}
}
and calling that method in the Leasf Task -
new Cru5tyBot().updateStatus("Doing stuff....");
Still didnt work
Should be simple but its driving me nuts, cant work out what im doing wrong, someone please help...
I tried to change it directly by implimenting a comman in the Leaftask-
new Cru5tyBot().status = ("Doing stuff...");
Didnt work!
In my main class I created a method to change it internaly -
public class Cru5tyBot extends TreeBot implements EmbeddableUI {
public String status = "Starting...";
public void updateStatus(String newStatus) {
this.status = newStatus;
}
}
and calling that method in the Leasf Task -
new Cru5tyBot().updateStatus("Doing stuff....");
Still didnt work
Should be simple but its driving me nuts, cant work out what im doing wrong, someone please help...