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...
Type: Posts; User: kendraheartt
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...
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...
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...
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...
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...
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...
Null Pointer Exception fixed.