Here is a walk function I made, the error occurs on the execute(walkEvent) line.
public void walk(Area area) throws InterruptedException{
WebWalkEvent walkEvent = new WebWalkEvent(area);
execute(walkEvent);
while (!area.contains(myPlayer().getPosition())) {
Thread.sleep(1000);
}
}
This is called like this: walk(new Area(3189, 3273, 3189, 3272));
Does anyone know what is wrong with this function that would be causing it to throw a null pointer exception?