Jump to content

Cant get getWalking().walkPath(path) to work for me


Recommended Posts

Posted
Position[] path = {
    		    new Position(3225, 3219, 0),
    		    new Position(3233, 3218, 0),
    		    new Position(3235, 3223, 0),
    		    new Position(3232, 3227, 0),
    		    new Position(3227, 3232, 0),
    		    new Position(3223, 3239, 0),
    		    new Position(3220, 3246, 0),
    		    new Position(3217, 3255, 0),
    		    new Position(3215, 3260, 0),
    		    new Position(3214, 3270, 0),
    		    new Position(3214, 3270, 0)
    		};
    	
    	getWalking().walkPath(path);

gives me the error: "The method walkPath(List<Position>) in the type Walking is not applicable for the arguments (Position[])" on .walkPath but if i try to add the path as anything but an array it will throw thousands of errors at me.

 

Cant use Webwalker so trying to get this path to work is necessary for me but idk what im supposed to do. 

The tutorial Alek posted seems to be outdated 

 

Creating a path like in Explvs tutorial (

which would look like this: 

List<Position> path = new ArrayList<>();
        path.add(new Position(3225, 3219, 0));
        path.add(new Position(3233, 3218, 0));
        
        
        getWalking().walkPath(path);

and give the error: "The type List is not generic; it cannot be parameterized with arguments <Position>" on "List" but no error on the getWalking() part

Posted (edited)

1. Walk path only accepts List<Position> as its parameter not Position[], because its the new walking system not the one from 2014

2. You have to

import java.util.List;

not

import java.awt.List;

Because awt.List is a display element and util.List is a generic type for collections

Edited by Vilius
  • Like 1
  • Heart 1
Posted
7 minutes ago, Vilius said:

1. Walk path only accepts List<Position> as its parameter not Position[]

2. You have to


import java.util.List;

not


import java.awt.List;

Because awt.List is a display element and util.List is a generic type for collections

thank you so much! <3

finally it works 

  • Like 1

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...