Is missing return statement fixable?
<p>I don't know why this always compiles saying that it is missing a return statement, if anyone can help me out that would be great! I've tried for a couple of hours and still don't see why this code won't compile. I'm not all the good with java but this code looks perfect to me.</p>

<pre><code>import java.awt.Color;
import java.awt.Graphics;
import java.awt.Point;
import java.awt.Rectangle;

import javax.swing.JFrame;
import javax.swing.JOptionPane;

import net.xotiksys.api.ActiveScript;
import net.xotiksys.api.Manifest;
import net.xotiksys.api.methods.input.Mouse;
import net.xotiksys.api.methods.recognition.ColorRecognition;
import net.xotiksys.api.painting.Paintable;
import net.xotiksys.api.util.Time;

@Manifest(author = "iwrestledabearonce", description = "Auto Miner with bank support", name = "MiningBot", version = 1.0)
public class MiningBot extends ActiveScript implements Paintable {

    private int Mined;
    private Color ITEM = new Color(0, 0, 0);
    private static final Color addy = new Color(74, 93, 74);
    private static final Rectangle magicTab = new Rectangle(629, 170, 28, 30);
    private static final Rectangle inv = new Rectangle(551, 206, 185, 255);
    private static final Rectangle GFrame = new Rectangle(2, 3, 517, 339);
    private static final long START_TIME = System.currentTimeMillis();
    private Point ROCK = null;
    private Point rockToMine = null;
    private String Status = "Starting Auto Miner by iwrestledabearonce - Version 1.0 - Please be patient...";
    private String TempColor = "";

    @Override
    public int script() {
        Time.sleep(700);
        if (ROCK != null) {
            startMining(); //by iwrestledabearonce
        }
        else
            return 700;
    }

    public void startMining() {
    do {
            ROCK = ColorRecognition.getPoint(addy, 2, inv);
            rockToMine = ColorRecognition.getPoint(ITEM, 2, inv);
                if (ROCK != null) {
                    Mouse.click(ROCK, 0, 0, true);
                    Time.sleep(700);
                    Mined++;
                    Status = "Mining Ore...";
                    stopScript();
            } while (ROCKS != null &amp;&amp; validate());
    }



    public void paint(final Graphics g) {
        g.setColor(Color.ORANGE);
        int ycoord = 349;
        g.drawString("Status: " + Status, 15, ycoord += 10);
        g.drawString("Rock's Mined: " + Mined, 15, ycoord += 20);
        g.drawString("Run Time: "+ Time.format(System.currentTimeMillis() - START_TIME),15, ycoord += 30);
    }
}
</code></pre>

<p>THE NEW CODE ABOVE NOW CREATES THIS ERROR BELOW:</p>

<pre><code>Scripts\MiningBot.java:52: error: while expected
        }
         ^
Scripts\MiningBot.java:56: error: illegal start of expression
        public void paint(final Graphics g) {
               ^
Scripts\MiningBot.java:56: error: ')' expected
        public void paint(final Graphics g) {
                   ^
Scripts\MiningBot.java:56: error: ';' expected
        public void paint(final Graphics g) {
                         ^
Scripts\MiningBot.java:56: error: ';' expected
        public void paint(final Graphics g) {
                                          ^
Scripts\MiningBot.java:63: error: reached end of file while parsing
}
 ^
6 errors

C:\Users\TJ\Desktop\XotikColor&gt;pause
Press any key to continue . . .
</code></pre>
