Hey guys, now I have another problem with Pacman :( I want to make a Textbox to show the core, but it doesn't work.
I declared this variable:
Then I wrote this Method:
Then I wrote this in the method "prepare()" (This is a method I wrote to design the world):
And now this message appears when I try to compile this:
cannot find symbol- method getImage()
I hope you can help me again! :)
1 | public String myTextbox; |
1 2 3 4 5 6 7 8 | public void writeText(String myText) { GreenfootImage image = getImage(); image.clear(); image.setColor(Color.BLACK); image.drawString(meinText, 10 , 10 ); } |
1 2 3 | myTextbox = new Score(); addObject(myTextbox, 4 , 0 ); myTextbox.writeText( "Hello" ); |