Achievement Help

Discussion in 'Plugin Development' started by Jbitters3, Mar 18, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    Jbitters3

    Here is my error: Multiple markers at this line
    - Line breakpoint:AchievementHandler [line: 36] - parse(List<String>)
    - Null pointer access: The variable achievements can only be null at this
    location
    - The value of the local variable put is not used

    Here is my code:
    Code:java
    1. public HashMap<Achievement, Long> parse(List<String> d) {
    2. HashMap<Achievement, Long> achievements = null;
    3.  
    4. for (String data : d) {
    5. String[] a = data.split(":");
    6. try {
    7. Achievement ach = Achievement.valueOf(a[0]);
    8. Long l = Long.parseLong(a[1]);
    9. Long put = achievements.put(ach, l);
    10. } catch (Exception ex) {
    11.  
    12. }
    13. }
    14.  
    15. return achievements;
    16. }
     
  2. Offline

    Jbitters3

    Any help, I got lost in my own code.
     
Thread Status:
Not open for further replies.

Share This Page