Rzeszut Posted July 17, 2012 Posted July 17, 2012 [javac] D:\SOURCE\trunk\Core\java\com\l2jserver\gameserver\model\actor\instance\L2CrystalInstance.java:695: error: setReputationScore(int,boolean) has private access in L2Clan [javac] player.getClan().setReputationScore(player.getClan().getReputationScore() - price, true); [javac] ^ [javac] D:\SOURCE\trunk\Core\java\com\l2jserver\gameserver\model\actor\instance\L2CrystalInstance.java:702: error: setReputationScore(int,boolean) has private access in L2Clan [javac] player.getClan().setReputationScore(player.getClan().getReputationScore() - price, true); [javac] ^ [javac] 2 errors int current = _warningCount; _warningCount = current + count; player.getClan().setReputationScore(player.getClan().getReputationScore() - price, true); player.sendPacket(new CreatureSay(0, Say2.PARTY, "Crystal", "Successfully purchased " + count + " warnings!")); } else if (abilitiId == 2) { int current = _defenceSpawnCount; _defenceSpawnCount = current + count; player.getClan().setReputationScore(player.getClan().getReputationScore() - price, true); player.sendPacket(new CreatureSay(0, Say2.PARTY, "Crystal", "Successfully purchased " + count + " Defence Abilities!")); Quote
0 ^Wyatt Posted July 17, 2012 Posted July 17, 2012 That's the reason to first, spam Matim's post and then, come here and post it?... Maybe if you read the error that's shown on console.... error: setReputationScore(int,boolean) has private access in L2Clan Index: java/com/l2jserver/gameserver/model/L2Clan.java =================================================================== --- java/com/l2jserver/gameserver/model/L2Clan.java (revision 5235) +++ java/com/l2jserver/gameserver/model/L2Clan.java (working copy) @@ -1904,7 +1904,7 @@ setReputationScore(getReputationScore() - value, save); } - private void setReputationScore(int value, boolean save) + public void setReputationScore(int value, boolean save) { if (_reputationScore >= 0 && value < 0) { Quote
0 Rzeszut Posted July 17, 2012 Author Posted July 17, 2012 ok i check and more info ok? ;) thanks nice members Wyatt Quote
0 Tryskell Posted July 17, 2012 Posted July 17, 2012 Changing the type of the method isn't the good solution, if it's private it's for a good reason, for instance, that method got children, named takeReputation and addReputation, use those methods. Quote
0 ^Wyatt Posted July 18, 2012 Posted July 18, 2012 Changing the type of the method isn't the good solution, if it's private it's for a good reason, for instance, that method got children, named takeReputation and addReputation, use those methods. Yep, right, just didn't have time to look it well. @author As Tryskell said you can use: player.getClan().addReputationScore(1000, true); player.getClan().takeReputationScore(1000, true); Quote
0 ^Wyatt Posted July 18, 2012 Posted July 18, 2012 In that case, it's takeReputation (-). 8) Yea... but as I see in the code, I think you can also use addReputationScore(-200, true) and will be the same effect xd Quote
0 Tryskell Posted July 18, 2012 Posted July 18, 2012 Yea... but as I see in the code, I think you can also use addReputationScore(-200, true) and will be the same effect xd Yup but gl to re-read your code once you forget you did shit previously, lol :). Quote
Question
Rzeszut
7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.