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

2015/1/13

Cannot find symbol-Variable Counter

Dan123 Dan123

2015/1/13

#
Error comes up for "Counter++;"
public void counter()
{
            Actor balloon = getOneIntersectingObject(balloon.class); 
            if (balloon !=null ) 
          
        {   
            getWorld().removeObject(balloon);
            Counter++;
            example EXAMPLE = new example();
        }
}
public void act();
{
          counter();
          getWorld().addObject(example) ;
}}
xFabi xFabi

2015/1/13

#
counter not in capital letter.. Do you ever read the error messages, or try to fix sth by yourself..?
Dan123 Dan123

2015/1/13

#
yes it frustrates me and i give up. just stupid little errors wont make the whole thing work
Dan123 Dan123

2015/1/13

#
error still comes up when counter is even spelled without captial letter
xFabi xFabi

2015/1/13

#
it works for me, sure you didnt forget this?:
int counter = 0;
Dan123 Dan123

2015/1/13

#
thanks for your help
You need to login to post a reply.