The project contains just one actor class and the default MyWorld class. When pressing the "compile" button, it keeps compiling this actor class and won't stop. This is the code I'm trying to compile:
some of the stuff, like the conversion to byte variables or the four int valuse, can be ignored, as they are not in use yet. I believe the problem has something to do with the BufferedImage stuff. Does anyone know how to fix it?
import greenfoot.*;
import java.awt.image.BufferedImage;
public class Sprite extends Actor
{
public void act()
{
spriteTexturing(0,0);
}
public void spriteTexturing(int spriteNR,int paletteNR)
{
byte sprite=(byte)spriteNR;
byte palette=(byte)paletteNR;
int X=0;
int Y=0;
int dX=16;
int dY=16;
BufferedImage spritesheet=readImage("spritesheet.png");
BufferedImage spriteTexture=spritesheet.getSubimage(0,0,16,16);
}
}
