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

2014/4/29

There is some mistake can some in help me ?

Asoraso Asoraso

2014/4/29

#
private int counter; private void runCounter() { counter++; if (counter == 500) getWorld().removeObject(this); } public void act() { removeTouching(Wand)(); runCounter(); } ; expected
danpost danpost

2014/4/29

#
There is definitely something wrong with this line: removeTouching(Wand)(); The two parenthesis at the end either do not belong or are misplaced.
Asoraso Asoraso

2014/5/4

#
Yeah but that () should colose the line so if I reset these 2 parenthesis it wrong too :(
davmac davmac

2014/5/4

#
Yeah but that () should colose the line
I'm not sure what you mean by that, but perhaps that line should be:
 removeTouching(Wand.class);
Please use code tags when you post your code.
Asoraso Asoraso

2014/5/6

#
private void runCounter() { counter++; if (counter == 500) getWorld().removeObject(this); } public void act() { removeTouching(Wand.class) runCounter(); } So I used that code but like before there is that masage "; expected"
davmac davmac

2014/5/6

#
Yes, you did not put a ';' at the end of the line. The code I wrote has a ';' but yours doesn't.
Asoraso Asoraso

2014/5/6

#
thx
emre.kilic emre.kilic

2014/5/6

#
you must go to school. in school you learn new and good things.
You need to login to post a reply.