Pokerstar Posted May 13, 2018 Share Posted May 13, 2018 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. Quote Link to comment Share on other sites More sharing options...
Canidae Posted May 13, 2018 Share Posted May 13, 2018 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(); } 1 Quote Link to comment Share on other sites More sharing options...
Alek Posted May 13, 2018 Share Posted May 13, 2018 Please press Ctrl+Alt+L in IntelliJ. @Canidae's answer is correct though. Quote Link to comment Share on other sites More sharing options...
dreameo Posted May 13, 2018 Share Posted May 13, 2018 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. Quote Link to comment Share on other sites More sharing options...