This content has been marked as final. Show 1 reply
1.) You should use code tags when posting code.
2.) You should read the stacktrace closely to find out which exact line number in your code threw the exception.
My guess is that it's the line
because you didn't initialize the array tiles using the new operator. This is just a guess since you didn't post the full stacktrace. Also, NullpointerExceptions are one of the easiest to debug. Just adding print out lines at strategic values can show you which variables are initialized and which ones are not.
tiles[a] = aa.getImage();