You gave the wrong code used.
|
So im trying to compile this file playerasssitantr but I dont know how to fix this error
symbol: variable xp lock
location: variable c of type client
symbol: variable jail
location: variable c of type client
[15:07:14] sandra vernon: c.xploc
This is the code
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;
}
and this is the error that I get
You gave the wrong code used.
There was indeed a part of the code missing.
This is the whole code:
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;
}
Delete the xp lock stuff.... Or rename it to your variable..
thanks paradox, that fixed it.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |