Search:

Type: Posts; User: kendraheartt

Search: Search took 0.10 seconds.

  1. Replies
    17
    Views
    2,596

    Re: Help With Null Pointer Exception

    Row: 1, 2, 3... 25
    Col: 1, 2, 3.... 25
    shield[row][col] didn't show up when i put in the println statements and
    added what you told me to print i got an error saying the Variable Arrays could not...
  2. Replies
    17
    Views
    2,596

    Re: Help With Null Pointer Exception

    if ((!shield[row][col].isHidden () && (shield[row][col].overlaps (missile)) || shield[row][col].overlaps (bomb))) is the line where i keep getting the NPE... Sorry but I don't quite understand what...
  3. Replies
    17
    Views
    2,596

    Re: Help With Null Pointer Exception

    when I include both it comes back as both of them as null if i include both of them in the if statement (both the missile and the bomb), but if i only include one in the if statement it doesn't give...
  4. Replies
    17
    Views
    2,596

    Re: Help With Null Pointer Exception

    It works only if I isolate each variable (the bomb works if I don't include the || (!shield[row][col].isHidden () && shield[row][col].overlaps (missile)) portion and vice versa for the missile... is...
  5. Replies
    17
    Views
    2,596

    Re: Help With Null Pointer Exception

    It says Exception in thread "Thread-37" java.lang.NullPointerException
    at objectdraw.Drawbale2D.overlaps (Drawable2D.java:123)
    at Shield.isHit(Shield.java:103)
    at Bomb.run(Bomb.java:87)
    whenever...
  6. Replies
    17
    Views
    2,596

    Re: Help With Null Pointer Exception

    Okay, so I just did the same thing for the missile as I did the bomb, and I'm still getting the null pointer exception. Im pretty sure theres an error with theShield variable, but I cant seem to...
  7. Replies
    17
    Views
    2,596

    Help With Null Pointer Exception

    Null Pointer Exception fixed.
Results 1 to 7 of 7