I always get an error message when my crystals break(see code for context) but i dont see the problem.
The errors are in line 32 and 16
public class Kristall extends Jim
{
long berühren = System.currentTimeMillis();
private int hp=3;
public void act()
{
fallen();
touching(); //first error
}
public void fallen()
{
move(2);
setRotation(90);
if(this.isAtEdge())
{
getWorld().removeObject(this);
}
}
public void touching()
{
if(isTouching(Geschoss.class)){ //second error
getWorld().removeObjects(getObjectsInRange(128,Geschoss.class));
long curTime = System.currentTimeMillis();
if (curTime >= berühren + 100){
hp -= 1;
}
if(hp<1)
{
getWorld().removeObject(this);
}
}
}
}
