| | |
Case gives 100 errors, please help
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
•
•
Join Date: May 2008
Posts: 7
Reputation:
Solved Threads: 0
This case,
I made it by myself, and it gives 100 errors,
what could be wrong with it?
The code means,
Please help, thanks.
Java Syntax (Toggle Plain Text)
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,
Java Syntax (Toggle Plain Text)
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.
•
•
Join Date: Jan 2008
Posts: 3,837
Reputation:
Solved Threads: 503
•
•
•
•
This case,
Java Syntax (Toggle Plain Text)
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,
Java Syntax (Toggle Plain Text)
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.
•
•
Join Date: Jan 2008
Posts: 3,837
Reputation:
Solved Threads: 503
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.
•
•
Join Date: May 2008
Posts: 7
Reputation:
Solved Threads: 0
Errors.
Java Syntax (Toggle Plain Text)
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 . . .
•
•
Join Date: Jan 2008
Posts: 3,837
Reputation:
Solved Threads: 503
•
•
•
•
Errors.
Java Syntax (Toggle Plain Text)
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:
JAVA Syntax (Toggle Plain Text)
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;
Last edited by VernonDozier; May 15th, 2008 at 6:04 pm. Reason: fixed typo
•
•
Join Date: Jan 2008
Posts: 3,837
Reputation:
Solved Threads: 503
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:
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:
java Syntax (Toggle Plain Text)
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;
java Syntax (Toggle Plain Text)
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;
![]() |
Similar Threads
- Orphaned Case error (Java)
- Need Help In Decoder Programming (C++)
- syntax errors and the check module command? (Python)
- Java Swing Calculator program not running. It has 0 errors (Java)
- compilation errors (C++)
- C++ Build Errors (C++)
- Performance Improvements (Windows NT / 2000 / XP)
- Some Help with a simple C++ class. (C++)
Other Threads in the Java Forum
- Previous Thread: Word and Character counting (small problem)
- Next Thread: Looking for javadoc script.
| Thread Tools | Search this Thread |
Tag cloud for Java
affinetransform android api apple applet application arc arguments array arrays automation binary bluetooth businessintelligence chat class classes client code component database desktop draw ebook eclipse encode equation error event exception file fractal game givemetehcodez graphics gui helpwithhomework html ide image input integer intersect j2me java javaexcel javaprojects jmf jni jpanel julia linked linux list loop mac main map method methods mobile netbeans newbie number object open-source oracle parameter print problem program programming project properties recursion reference replaysolutions rotatetext scanner score screen scrollbar server set size sms socket sort sql string superclass swing template test threads time tree windows working xstream






