Java Scanner issues (JFrame)
问题 I am trying to use a scanner to edit the level of my tower defense game. However it will not update the level (the tile images) to that of the custom file (0 is grass 1 is stone -1 is nothing, etc.). I have found the error but how do i fix it, what do i need to add/change to get rid of this? java.lang.NullPointerException at Levels.loadLevels(Levels.java:11) at Window.define(Window.java:28) at Window.paintComponent(Window.java:44) line 11: for(int y=0;y<Window.room.block.length;y++) { line 28