Illegal Start, Identifier expected etc. Try to compile it and read all the errors. This script is a first attempt at Walking from Varrock West Bank to The General store and buying 27 pots, then Returning to bank.
When you post a fix, please post why you changed something so I can remember it for future scripts.
Thanks
Errors are shown below.
When you post a fix, please post why you changed something so I can remember it for future scripts.
Thanks
Errors are shown below.
Code:
[20:50:18][ Compiler] Compiling 41 class files using internal method.
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:19: illegal start of type
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:19: <identifier> expected
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:19: ';' expected
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:19: illegal start of type
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:21: invalid method declaration; return type required
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:23: illegal start of type
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:23: <identifier> expected
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:23: ';' expected
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:23: illegal start of type
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:26: illegal start of type
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:26: <identifier> expected
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:26: ';' expected
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:26: illegal start of type
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:26: <identifier> expected
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:26: ';' expected
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:27: illegal start of type
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:27: <identifier> expected
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:28: invalid method declaration; return type required
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:28: <identifier> expected
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:28: ';' expected
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:28: illegal start of type
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:28: <identifier> expected
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:28: ';' expected
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:28: illegal start of type
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:28: <identifier> expected
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:28: ';' expected
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:30: illegal start of type
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:30: <identifier> expected
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:30: ';' expected
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:30: illegal start of type
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:30: <identifier> expected
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:30: ';' expected
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:30: illegal start of type
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:80: illegal start of expression
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:83: illegal start of expression
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:83: ';' expected
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:83: ';' expected
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:92: illegal start of expression
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:92: ';' expected
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:95: reached end of file while parsing
[20:50:21][ Compiler] .\Scripts\WestBankToStore.java:98: reached end of file while parsing
[20:50:21][ Compiler] 41 error(s).
Code:
import java.awt.*;
import java.util.*;
import com.speljohan.rsbot.accessors.Player;
import com.speljohan.rsbot.bot.*;
import com.speljohan.rsbot.script.*;
import com.speljohan.rsbot.script.wrappers.*;
public class WestBankToStore extends Script{
public String getName() {
return "WestBankToStore";}
if (isInventoryFull( ))
walkToBank();
bankItems();
if(bankItems())
walkToShop();
if (walkTopShop()){
TradeSeller();
wait(random(750, 1250));}
if ( interfaceExists(620) )
buyItems();
public RSTile[] toShop = new RSTile[]{
new RSTile(3185, 3437),new RSTile(3201, 3428),new RSTile(3217, 3416)};
public RSTile[] toBank = new RSTile[]{
new RSTile(3214, 3423),new RSTile(3185, 3437)};
public boolean walktoShop( ){
if ( distanceTo(toShop[toShop.length - 1]) < 5){
return true;}
else{
walkPathMM(randomizePath(toShop,3,3), 15);
return false;
wait(3000);
}
}
public void TradeSeller( ){
RSNPC ShopKeeper = getNearestNPCByID( 522,523 );{
if ( ShopKeeper != null ){
atNPC(ShopKeeper, "Trade");
wait( random(250, 500) );
if ( interfaceExists(620) )}
public void Buyitems( ){
clickMouse(76, 110, 3, 3, false );
wait( random(10, 25) );
atMenu("Buy X");
wait(random(500, 1000));
Bot.getInputManager().sendKeys("27", true);
wait(random(750, 1250));
}
public boolean bankitems(){
RSObject bankBooth = findObject( 1142 );
atObject(bankBooth, "Use-quickly");
wait(random(750, 1000));



