Jump to content

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


ez11

Recommended Posts

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

Link to comment
Share on other sites

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
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.
Note: Your post will require moderator approval before it will be visible.

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