Jump to content

Making sure Im in the right position


Recommended Posts

Posted

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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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