Try getXP instead of getExp.
|
Ok, so I have no idea why this happened.
I followed everything what the tut said: http://www.rune-server.org/runescape...nes-altar.html
And when I compiled it gave me this:
Someone tell me how to fix this?Code:src\server\content\Prayer.java:140: error: cannot find symbol c.getPA().addSkillXP(getExp(id)*2*Config.PRAYER_ EXPERIENCE, 5); ^ symbol: method getExp(int) location: class Prayer src\server\content\Prayer.java:161: error: cannot find symbol c.getPA().addSkillXP(getExp(id)* 2*Config.PRAYER_EXPERIENCE, 5); ^ symbol: method getExp(int) src\server\model\items\UseItem.java:51: error: cannot find symbol if (c.getPrayer().isBone(itemId) && c.usingAltar ==false) { ^ symbol: method isBone(int) location: class Prayer Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 3 errors Press any key to continue . . .
Try getXP instead of getExp.
Here, just use these.
Code:public boolean isBone(int id) { for (int j = 0; j < bonesExp.length; j++) { if (bonesExp[j][0] == id) { return true; } } return false; }Let me know if you're still having problems with it.Code:public int getExp(int id) { for (int j = 0; j < bonesExp.length; j++) { if (bonesExp[j][0] == id) { return bonesExp[j][1]; } } return 0; }
Code:src\server\content\Prayer.java:96: error: cannot find symbol for (int j = 0; j < bonesExp.length; j++) { ^ symbol: variable bonesExp location: class Prayer src\server\content\Prayer.java:97: error: cannot find symbol if (bonesExp[j][0] == id) { ^ symbol: variable bonesExp location: class Prayer src\server\content\Prayer.java:98: error: cannot find symbol return bonesExp[j][1]; ^ symbol: variable bonesExp location: class Prayer src\server\content\Prayer.java:138: error: cannot find symbol c.getPA().addSkillXP(getXP(id)*2*Config.PRAYER_E XPERIENCE, 5); ^ symbol: method getXP(int) location: class Prayer src\server\model\items\UseItem.java:51: error: cannot find symbol if (c.getPrayer().isBone(itemId) && c.usingAltar ==false) { ^ symbol: method isBone(int) location: class Prayer src\server\model\players\packets\ClickItem.java:171: error: cannot find symbol if (c.getPrayer().IsABone(itemId)) ^ symbol: method IsABone(int) location: class Prayer Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 6 errors Press any key to continue . . .
You obviously don't have the methods getExp in class Prayer. And since it seems that it's a method that YOUR supposed to make, it would make sense if you'd add it (should return XP when you pass in bone id).
Other than that, method isBone in whatever getter getPrayer (assuming its prayer class) is not defined.
Ok, so ive managed to fix some errors but dont know how to fix these
Code:src\server\content\Prayer.java:140: error: cannot find symbol c.getPA().addSkillXP(getExp(id)*2*Config.PRAYER_ EXPERIENCE, 5); ^ symbol: method getExp(int) location: class Prayer src\server\content\Prayer.java:161: error: cannot find symbol c.getPA().addSkillXP(getExp(id)* 2*Config.PRAYER_EXPERIENCE, 5); ^ symbol: method getExp(int) src\server\model\items\UseItem.java:51: error: cannot find symbol if (c.getPrayer().isBone(itemId) && c.usingAltar ==false) { ^ symbol: method isBone(int) location: class Prayer Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 3 errors Press any key to continue . . .
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |