Jump to content

Making sure Im in the right position

Recommended Posts

Hey guys, the noob here again!


So I want to make sure that my character is in a certain position, and if he isn't, I want the script to stop.


This is what I have.

 	if (myPlayer().getPosition() != myPosition(X, Y, 0)) {
      		log("We are not in position! Stopping script!");
      	else {
      		log("We are in position! Moving on!");

When I type this I get a red squiggly under the "myPosition" part.


My question is:


How do I fix this so that the script will check that my character is in a certain position?


I have added "import org.osbot.rs07.api.map.Position;" to the top of the script.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...