今天我收到了一個錯誤,我無法解釋我正在看notch的視頻,他正在創建2d遊戲HerpFortress(http://pt.twitch.tv/notch/b/309642636(0:42:44)),而我正在關注他的代碼,但是此行中我得到,我得到一個throught錯誤...Java圖像錯誤
img.getRGB(x * sw, y * sh, sw, sh, result [x][y].pixels, 0, sw);
和錯誤是,
The method getRGB(int, int, int, int, int[], int, int) in the type BufferedImage is not applicable for the arguments (int, int, int, int, int, int, int)
幫助?
第5個參數應該是一個數組。你已經提供了一個int。這裏是[BufferedImage]的文檔(http://docs.oracle.com/javase/7/docs/api/java/awt/image/BufferedImage.html) – jahroy
哥們它是一個數組 – MysteryGuy
不,它不是。否則,你不會得到那個錯誤。它看起來像你正在引用一個數組給我。 – jahroy