This site requires JavaScript, please enable it in your browser!
Greenfoot back
Volatile_Matter
Volatile_Matter wrote ...

2014/3/17

Problem with a cannot find symbol error

Volatile_Matter Volatile_Matter

2014/3/17

#
I have an actor called "MEANBIRD", and I want that actor to point and move towards an actor called "TURDLE". There will be more than one iteration of TURDLE on the screen at a time. My code is
public void act() 
    {
        turnTowards(TURDLE);  
        move(10);  

    }    
}
and it returns the error "cannot find symbol - variable TURDLE". I imagine my mistake is simple, but I do not understand what my error is. I want several different birds on the screen going towards several different turtles; is it possible to do this? To have the birds going to the nearest turtle?
You need to login to post a reply.