May 13, 20187 yr I am starting the journey of trying to learn java and osbot in the hopes to make some personal scripts. private static final Position PLAYER_LOC = new Position(3169, 3423, 0); @Override public void onStart() throws InterruptedException { } @Override public int onLoop() throws InterruptedException { if (myPlayer().getPosition().equals(PLAYER_LOC)); { log("You are in the right location"); getBank().open();} I am trying to make the bot only attempt to open the bank if its standing on that position. But it still attempts to open the bank, regardless of what tile/location I am on. What part is incorrect? Thanks.
May 13, 20187 yr You are closing your if statement by putting a semicolon at the end of it. Your code should look like this. if (myPlayer().getPosition().equals(PLAYER_LOC)) { getBank().open(); }
May 13, 20187 yr Haha what's with all the newbies lately. Learn some basic Java first and then try to script. Not the other way around, it doesn't work to well regardless of the outcome.
Create an account or sign in to comment