NumL0ck Posted August 15, 2012 Posted August 15, 2012 Please help to me, I have 2 small errors, but i can't fix them... I'm using L2jFrozen, big thanks for help!!! public void rewardForAchievement(int achievementID, L2PcInstance player) { Achievement achievement = _achievementList.get(achievementID); for (int id: achievement.getRewardList().keySet()) player.addItem(achievement.getName(), id, achievement.getRewardList().get(id), player, true); } Error on: player.addItem(achievement.getName(), id, achievement.getRewardList().get(id), player, true); try { id = Integer.parseInt(st.nextToken()); am-beep-t = Integer.parseInt(st.nextToken()); if (player.getInventory().getItemsByItemId(id).size() >= am-beep-t) { return true; } } Error on: if (player.getInventory().getItemsByItemId(id).size() >= am-beep-t)
0 vampir Posted August 15, 2012 Posted August 15, 2012 the easiest way about the summoner would be just remove those lines and dont use it. About getItemsByItemId - find method that is returning L2ItemInstance with argument int itemId and replace the name.
0 NumL0ck Posted August 16, 2012 Author Posted August 16, 2012 explain better with About getItemsByItemId - find method that is returning L2ItemInstance with argument int itemId and replace the name. because i'm newbie.
0 vampir Posted August 16, 2012 Posted August 16, 2012 got to L2Inventory and find method like public L2Item name(int id) - just name will be different.
Question
NumL0ck
Please help to me, I have 2 small errors, but i can't fix them...
I'm using L2jFrozen, big thanks for help!!!
Error on:
player.addItem(achievement.getName(), id, achievement.getRewardList().get(id), player, true);
Error on:
if (player.getInventory().getItemsByItemId(id).size() >= am-beep-t)
4 answers to this question
Recommended Posts