NinjaxKimmy Posted June 20, 2019 Share Posted June 20, 2019 if (myArea.contains(myPlayer())) { log("You are in the right area!"); } else { getWalking().walk(myArea); } IntelliJ is giving me and 'unreachable' error when located inside of the onLoop() and a bunch more outside in my Script class. Quote Link to comment Share on other sites More sharing options...
Gunman Posted June 20, 2019 Share Posted June 20, 2019 Using area.contains(myPosition) Is shorter if you like typing one less thing. Quote Link to comment Share on other sites More sharing options...
FrostBug Posted June 20, 2019 Share Posted June 20, 2019 The problem is not in the code snippet you posted; but elsewhere in your script. We would need the full thing to tell you where exactly Quote Link to comment Share on other sites More sharing options...
NinjaxKimmy Posted June 20, 2019 Author Share Posted June 20, 2019 Okay, I will try out some of the other methods recommended and if I'm still getting errors I'LL BE BACK. Thank you. Quote Link to comment Share on other sites More sharing options...