What error do you get when compiling?
|
Ok so I tried to make an x2 exp amulet for my SPAWN server (yea ik ) and i screwed up and now when i try to compile, i get this error :O ? Can someone find out what i did wrong ?
my method.
tut method.}
}
return
}
public boolean addSkillXP(int amount, int skill){
if (c.xpLock == true || c.Jail == true) {
return false;
}
if (amount+c.playerXP[skill] < 0 || c.playerXP[skill] > 200000000) {
if(c.playerXP[skill] > 200000000) {
c.playerXP[skill] = 200000000;
}
return false;
}
if (c.isDonator == 1 && c.playerEquipment[c.playerAmulet] == 295) {
amount *= Config.SERVER_EXP_BONUS * 2;
} else {
amount *= Config.SERVER_EXP_BONUS;
}
int oldLevel = getLevelForXP(c.playerXP[skill]);
c.playerXP[skill] += amount;
if (oldLevel < getLevelForXP(c.playerXP[skill])) {
if (c.playerLevel[skill] < c.getLevelForXP(c.playerXP[skill]) && skill
!= 3 && skill != 5)
c.playerLevel[skill] = c.getLevelForXP(c.playerXP[skill]);
levelUp(skill);
c.gfx100(199);
requestUpdates();
}
setSkillLevel(skill, c.playerLevel[skill], c.playerXP[skill]);
refreshSkill(skill);
return true;
public boolean addSkillXP(int amount, int skill){
if (c.xpLock == true || c.Jail == true) {
return false;
}
if (amount+c.playerXP[skill] < 0 || c.playerXP[skill] > 200000000) {
if(c.playerXP[skill] > 200000000) {
c.playerXP[skill] = 200000000;
}
return false;
}
if (c.isDonator == 1 && c.playerEquipment[c.playerAmulet] == 295) {
amount *= Config.SERVER_EXP_BONUS * 2;
} else {
amount *= Config.SERVER_EXP_BONUS;
}
int oldLevel = getLevelForXP(c.playerXP[skill]);
c.playerXP[skill] += amount;
if (oldLevel < getLevelForXP(c.playerXP[skill])) {
if (c.playerLevel[skill] < c.getLevelForXP(c.playerXP[skill]) && skill != 3 && skill != 5)
c.playerLevel[skill] = c.getLevelForXP(c.playerXP[skill]);
levelUp(skill);
c.gfx100(199);
requestUpdates();
}
setSkillLevel(skill, c.playerLevel[skill], c.playerXP[skill]);
refreshSkill(skill);
return true;
What error do you get when compiling?
And if you guys can't find the error can someone please give me the original code for the Addskillxp ? Thanks
go to player.java at line 2502 and delete o so it's return;
I don't know how that came in there
Now that you've fixed the syntax error it moves onto your content error.
Why are you coding in a notepad? Get an IDE (e.g. Eclipse) and you can resolve your problems much more easier.
You should have your XP method anyway set to something (maybe in Config class).
Add something like:
It's going to be something like that not exactly.Code:if (!wearID == ####) { xp += Config.MELEE_EXP_RATE*2; } else { xp += Config.MELEE_EXP_RATE.xpgain; }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |