This case,

case 18302:
if (playerLevel[19] <= 1) {
guard();
addSkillXP(19, 50);
isNpc = true;
updateRequired = true;
appearanceUpdateRequired = true;
else	if (playerLevel[19] >= 1) {
sendMessage("You need a shapeshifting level of 1 to do this.");
}
break;

I made it by myself, and it gives 100 errors,
what could be wrong with it?

The code means,

if player level 19 (19 = shapeshifting) equals 1 or higher, itll turn your character into a guard and will add Experience to skill 19 (Shapeshifting), 50 experience.
But if the level is 0 or lower, it will send a message saying
You need a shapeshifting level of 1 to do this.

Please help, thanks.

This case,

case 18302:
if (playerLevel[19] <= 1) {
guard();
addSkillXP(19, 50);
isNpc = true;
updateRequired = true;
appearanceUpdateRequired = true;
else	if (playerLevel[19] >= 1) {
sendMessage("You need a shapeshifting level of 1 to do this.");
}
break;

I made it by myself, and it gives 100 errors,
what could be wrong with it?

The code means,

if player level 19 (19 = shapeshifting) equals 1 or higher, itll turn your character into a guard and will add Experience to skill 19 (Shapeshifting), 50 experience.
But if the level is 0 or lower, it will send a message saying
You need a shapeshifting level of 1 to do this.

Please help, thanks.

Hard to say without seeing the rest of the code and the error messages. Don't assume that there are actually 100 errors. It could be a few errors or even one error compounding itself and the printout shows 100 errors when there really aren't. A single missed semicolon somewhere, a missing, extra, or misplaced bracket, a misspelling, etc., can result in 100 errors. I don't see any syntax errors in this code. You could be referring to a variable that doesn't exist or a function that doesn't exist or whatever. Impossible to say from what you have posted. Read the error messages carefully to give you a clue of what the problem is, fix the first error, compile again, fix the next, compile again, etc. It's very unlikely that you really have that many errors stemming from this code.

Well it is true, i think. When i delete this case i do not get 100 errors, it says.

Well it is true, i think. When i delete this case i do not get 100 errors, it says.

My point is that often you only have to correct one thing to make 100 errors go away. You may not have to correct 100 things. This is just speculation, however. It's impossible to give you advice on how to correct the errors unless you post the specific error messages and you post more code.

Errors.

private int somejunk;
        ^
client.java:22963: illegal start of expression
        public int EssenceMineX[] = {2893,2921,2911,2926,2899};
        ^
client.java:22964: illegal start of expression
        public int EssenceMineY[] = {4846,4846,4832,4817,4817};
        ^
client.java:22972: illegal start of expression
        public int EssenceMineRX[] = {3253,3105,2681,2591};
        ^
client.java:22973: illegal start of expression
        public int EssenceMineRY[] = {3401,9571,3325,3086};
        ^
client.java:22981: illegal start of expression
        public boolean stairs(int stairs, int teleX, int teleY) {
        ^
client.java:22981: ';' expected
        public boolean stairs(int stairs, int teleX, int teleY) {
                             ^
client.java:22981: <identifier> expected
        public boolean stairs(int stairs, int teleX, int teleY) {
                                         ^
client.java:22981: not a statement
        public boolean stairs(int stairs, int teleX, int teleY) {
                                              ^
client.java:22981: ';' expected
        public boolean stairs(int stairs, int teleX, int teleY) {
                                                   ^
client.java:22981: ';' expected
        public boolean stairs(int stairs, int teleX, int teleY) {
                                                              ^
client.java:23071: illegal start of expression
        public boolean resetStairs() {
        ^
client.java:23071: ';' expected
        public boolean resetStairs() {
                                  ^
client.java:23080: illegal start of expression
        public boolean crackCracker() {
        ^
client.java:23080: ';' expected
        public boolean crackCracker() {
                                   ^
client.java:23095: illegal start of expression
        public boolean IsInWilderness(int coordX, int coordY, int Type) {
        ^
client.java:23095: ';' expected
        public boolean IsInWilderness(int coordX, int coordY, int Type) {
                                     ^
client.java:23095: <identifier> expected
        public boolean IsInWilderness(int coordX, int coordY, int Type) {
                                                 ^
client.java:23095: not a statement
        public boolean IsInWilderness(int coordX, int coordY, int Type) {
                                                      ^
client.java:23095: ';' expected
        public boolean IsInWilderness(int coordX, int coordY, int Type) {
                                                            ^
client.java:23095: ';' expected
        public boolean IsInWilderness(int coordX, int coordY, int Type) {
                                                                      ^
client.java:23109: illegal start of expression
public int[] twoHanderz = {7158,1319,6528,14915};
^
client.java:23110: illegal start of expression
public boolean is2Hander()
^
client.java:23110: ';' expected
public boolean is2Hander()
                        ^
client.java:23118: illegal start of expression
public void robpaladin()
^
client.java:23118: illegal start of expression
public void robpaladin()
       ^
client.java:23118: ';' expected
public void robpaladin()
                      ^
client.java:23131: illegal start of expression
public void robhero()
^
client.java:23131: illegal start of expression
public void robhero()
       ^
client.java:23131: ';' expected
public void robhero()
                   ^
client.java:23144: illegal start of expression
public void robwarrior()
^
client.java:23144: illegal start of expression
public void robwarrior()
       ^
client.java:23144: ';' expected
public void robwarrior()
                      ^
client.java:23158: illegal start of expression
        public boolean Attack() {
        ^
client.java:23158: ';' expected
        public boolean Attack() {
                             ^
client.java:23552: illegal start of expression
        public boolean ResetAttack() {
        ^
client.java:23552: ';' expected
        public boolean ResetAttack() {
                                  ^
client.java:23560: illegal start of expression
         public int lnew = 0;
         ^
client.java:23561: illegal start of expression
         public int otherpkps = 0;
         ^
client.java:23562: illegal start of expression
         public int otherkillc = 0;
         ^
client.java:23564: illegal start of expression
        private void appendSetFocusDestination(stream str) {
        ^
client.java:23564: illegal start of expression
        private void appendSetFocusDestination(stream str) {
                ^
client.java:23564: ';' expected
        private void appendSetFocusDestination(stream str) {
                                              ^
client.java:23564: ';' expected
        private void appendSetFocusDestination(stream str) {
                                                         ^
client.java:23568: illegal start of expression
        public void PKz() {
        ^
client.java:23568: illegal start of expression
        public void PKz() {
               ^
client.java:23568: ';' expected
        public void PKz() {
                       ^
client.java:23604: illegal start of expression
public void CheckDrop() {
^
client.java:23604: illegal start of expression
public void CheckDrop() {
       ^
client.java:23604: ';' expected
public void CheckDrop() {
                     ^
client.java:23661: illegal start of expression
        public boolean ApplyDead() {
        ^
client.java:23661: ';' expected
        public boolean ApplyDead() {
                                ^
client.java:23710: illegal start of expression
        public boolean ApplyDeadz() {
        ^
client.java:23710: ';' expected
        public boolean ApplyDeadz() {
                                 ^
client.java:23754: illegal start of expression
public int keepItem = 0;
^
client.java:23755: illegal start of expression
public int keepItem2 = 0;
^
client.java:23756: illegal start of expression
public int keepItem3 = 0;
^
client.java:23757: illegal start of expression
public int keepItemAmount = 0;
^
client.java:23758: illegal start of expression
public int keepItemAmount2 = 0;
^
client.java:23759: illegal start of expression
public int keepItemAmount3 = 0;
^
client.java:23761: illegal start of expression
public void setSkillLevel(int skillNum, int currentLevel, int XP) {
^
client.java:23761: illegal start of expression
public void setSkillLevel(int skillNum, int currentLevel, int XP) {
       ^
client.java:23761: ';' expected
public void setSkillLevel(int skillNum, int currentLevel, int XP) {
                         ^
client.java:23761: <identifier> expected
public void setSkillLevel(int skillNum, int currentLevel, int XP) {
                                       ^
client.java:23761: not a statement
public void setSkillLevel(int skillNum, int currentLevel, int XP) {
                                            ^
client.java:23761: ';' expected
public void setSkillLevel(int skillNum, int currentLevel, int XP) {
                                                        ^
client.java:23761: ';' expected
public void setSkillLevel(int skillNum, int currentLevel, int XP) {
                                                                ^
client.java:23853: illegal start of expression
public void resetKeepItem() {
^
client.java:23853: illegal start of expression
public void resetKeepItem() {
       ^
client.java:23853: ';' expected
public void resetKeepItem() {
                         ^
client.java:23862: illegal start of expression
public void keepItem1() {
^
client.java:23862: illegal start of expression
public void keepItem1() {
       ^
client.java:23862: ';' expected
public void keepItem1() {
                     ^
client.java:23874: illegal start of expression
public void keepItem2() {
^
client.java:23874: illegal start of expression
public void keepItem2() {
       ^
client.java:23874: ';' expected
public void keepItem2() {
                     ^
client.java:23886: illegal start of expression
public void keepItem3() {
^
client.java:23886: illegal start of expression
public void keepItem3() {
       ^
client.java:23886: ';' expected
public void keepItem3() {
                     ^
client.java:23929: illegal start of expression
        public boolean ApplyRingOfLife() {
        ^
client.java:23929: ';' expected
        public boolean ApplyRingOfLife() {
                                      ^
client.java:23949: illegal start of expression
        public boolean ApplyRingz() {
        ^
client.java:23949: ';' expected
        public boolean ApplyRingz() {
                                 ^
client.java:23968: illegal start of expression
        public boolean CheckForSkillUse() { //Use Item On Item
        ^
client.java:23968: ';' expected
        public boolean CheckForSkillUse() { //Use Item On Item
                                       ^
client.java:23994: illegal start of expression
        public boolean CheckForSkillUse2(int ItemID, int ItemSlot) { //Use Item
On Object
        ^
client.java:23994: ';' expected
        public boolean CheckForSkillUse2(int ItemID, int ItemSlot) { //Use Item
On Object
                                        ^
client.java:23994: <identifier> expected
        public boolean CheckForSkillUse2(int ItemID, int ItemSlot) { //Use Item
On Object
                                                    ^
client.java:23994: not a statement
        public boolean CheckForSkillUse2(int ItemID, int ItemSlot) { //Use Item
On Object
                                                         ^
client.java:23994: ';' expected
        public boolean CheckForSkillUse2(int ItemID, int ItemSlot) { //Use Item
On Object
                                                                 ^
client.java:24380: illegal start of expression
public boolean CheckForSkillUse3(int Item, int Slot) {
^
client.java:24380: ';' expected
public boolean CheckForSkillUse3(int Item, int Slot) {
                                ^
client.java:24380: <identifier> expected
public boolean CheckForSkillUse3(int Item, int Slot) {
                                          ^
client.java:24380: not a statement
public boolean CheckForSkillUse3(int Item, int Slot) {
                                               ^
client.java:24380: ';' expected
public boolean CheckForSkillUse3(int Item, int Slot) {
                                                   ^
client.java:24844: illegal start of expression
        public boolean CheckForSkillUse4(int Item) {
        ^
client.java:24844: ';' expected
        public boolean CheckForSkillUse4(int Item) {
                                        ^
client.java:24844: ';' expected
        public boolean CheckForSkillUse4(int Item) {
                                                 ^
100 errors
Press any key to continue . . .

Errors.

private int somejunk;
        ^
client.java:22963: illegal start of expression
        public int EssenceMineX[] = {2893,2921,2911,2926,2899};
        ^
client.java:22964: illegal start of expression
        public int EssenceMineY[] = {4846,4846,4832,4817,4817};
        ^
client.java:22972: illegal start of expression
        public int EssenceMineRX[] = {3253,3105,2681,2591};
        ^


.... etc. ...


                                                 ^
100 errors
Press any key to continue . . .

These are all scoping issues. Your real error is not at these lines. When you get those types of errors, you almost inevitably are missing a bracket or have an extra one. The compiler thinks these are commands, not function headers, etc. Your problem is here:

case 18302:
	if (playerLevel[19] <= 1)
	 {
		guard();
		addSkillXP(19, 50);
		isNpc = true;
		updateRequired = true;
		appearanceUpdateRequired = true;
		else if (playerLevel[19] >= 1) 
		{
			sendMessage("You need a shapeshifting level of 1 to do this.");
		}

	break;

You are missing a closing bracket for your if statement. Everything else probably stems from that. Add a bracket before "break" on line 13. Indentation will help you catch those bracket errors since missing brackets will stand out much better when you indent.

Thank you soo much!

You're welcome. However, I gave you partially bad advice and I screwed up on my own indentation. You are missing a bracket, but the missing it in a different place that I thought. Originally, I suggested this:

case 18302:
	if (playerLevel[19] <= 1)
	 {
		guard();
		addSkillXP(19, 50);
		isNpc = true;
		updateRequired = true;
		appearanceUpdateRequired = true;
		else if (playerLevel[19] >= 1) 
		{
			sendMessage("You need a shapeshifting level of 1 to do this.");
		}
       // put closing bracket here
	break;

It now looks to me that you need a closing bracket, but you are missing it before the "else if" statement, not before the "break" statement, so this:

case 18302:
	if (playerLevel[19] <= 1)
	 {
		guard();
		addSkillXP(19, 50);
		isNpc = true;
		updateRequired = true;
		appearanceUpdateRequired = true;

        // missing bracket HERE


	else if (playerLevel[19] >= 1) 
	{
		sendMessage("You need a shapeshifting level of 1 to do this.");
	}
        // do not need bracket here.  Already have one ending the "else if" statement.
	break;
This question has already been answered. Start a new discussion instead.