PDA

View Full Version : Need help with 3 errors



haxor62
07-16-2008, 12:40 AM
Can someone help me fix these 3 errors

Script:

import com.speljohan.rsbot.script.*;
import com.speljohan.rsbot.script.wrappers.*;

public class FightCaves {

RSObject FightCave;
private int State = 0;
private int[] Cave = {9356};
private int[] Mej = {2617};
private int Runs = 0; //For Displaying info

public double getVersion( ) {
return( .1 );
}

public String getName( ) {
return( "Fight Cave" );
}

public String getAuthor( ) {
return( "xstream" );
}

public String getScriptCategory() {
return( "xstream/Combat" );
}

public int loop() {
{
switch (State) {
case 0:
atObject(Cave, "Enter");
}
return random(1000, 2000);
case 1:
ifRSNPC anotherNPC = getNearestNPCByID(2617); {
if (anotherNPC != null) {
}
State++;
Runs++;
}
}
return random(1000, 2000);
case 2:
System.out.println("Runs: " + Runs);
State = 0;
return random(1000, 2000);
}
}catch(Exception e)
e.printStackTrace()
return random(1000, 2000)

Error:

[ Compiler] C:\Documents and Settings\AJ\My Documents\RSBot\Scripts\FightC
aves.java:35: orphaned case
[ Compiler] C:\Documents and Settings\AJ\My Documents\RSBot\Scripts\FightC
aves.java:44: orphaned case
[ Compiler] C:\Documents and Settings\AJ\My Documents\RSBot\Scripts\FightC
aves.java:49: class, interface, or enum expected
[ Compiler] 3 error(s).

HyperSecret
07-22-2008, 06:09 AM
this is not the RSBot forums, please don't post this here, go and post at RSBot forums

GoF
07-27-2008, 01:53 PM
Wrong site. You might get more help from RSBot forums..