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

2016/4/8

why can't i make this work

krieos krieos

2016/4/8

#
} privatevoid timer() { time = time + 1; getWorld().showText("Time: " + time/60, 735, 20); } }
Super_Hippo Super_Hippo

2016/4/8

#
'private void' are two words.
danpost danpost

2016/4/8

#
Presuming you type the code into your post and you missed the space between 'private' and 'void', and presuming that the first and last close squiggly brackets are properly paired with another block of code (above) and the end of the class (below), then the code should work and the problem may be at a more general level. You should be more specific as far as the issue in your posts. Saying 'why can't i make it work' if very vague. How is it not working (what results are you getting)? How should it work (what results should you be getting -- here, it is quite obvious with the code itself)? Show any related code that might be of assistance in helping you (often this includes where the method is called from; what class and type of class the method is in; etc.).
You need to login to post a reply.