NinjaxKimmy Posted June 20, 2019 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.
Gunman Posted June 20, 2019 Posted June 20, 2019 Using area.contains(myPosition) Is shorter if you like typing one less thing.
FrostBug Posted June 20, 2019 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
NinjaxKimmy Posted June 20, 2019 Author 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.