SRL Archive - Java Help and Tutorials

Need help with 3 errors


haxor62

2008-07-15 20:40:28

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

2008-07-22 02:09:23

this is not the RSBot forums, please don't post this here, go and post at RSBot forums

GoF

2008-07-27 09:53:43

Wrong site. You might get more help from RSBot forums..