This is at the end of my Main actor:
It says missing return statement I tried to write return; but then it says "incompatible types: missing return value"
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | public void touch() { if (facingThing()) { Greenfoot.playSound( "Bump.mp3" ); } else if (facingEdge()) { Greenfoot.playSound( "Bump.mp3" ); } } public boolean facingEdge() { World myWorld = getWorld(); int x = getX(); int y = getY(); Greenfoot.playSound( "Bump.mp3" ); } <--error here public boolean facingThing() { World myWorld = getWorld(); int x = getX(); int y = getY(); Greenfoot.playSound( "Bump.mp3" ); } <--error here } |