Hey Guys, i dont know why but my Greenfoot say, that cannot find symbohl- variable pLinks
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class Schlange here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Schlange extends Actor
{
boolean zLinks;
/**
* Act - do whatever the Auto wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public Schlange (boolean pinks, String pBild)
{
zLinks = pLinks; // <-- The Error
this.setImage(pBild);
}
public void act()
{
if(this.getX()<0)
{
zLinks = false;
}
if(this.getX()> 700)
{
zLinks = true;
}
if(zLinks)
{
this.setLocation(this.getX()-1, this.getY());
}
else
{
this.setLocation(this.getX()+1, this.getY());
}
}
}
