Syntax error on token ">", invalid AssignmentOperator help.

Okay sorry if this is the wrong category or whatever but I really need help, considering this simply wont solve itself.

It says Syntax error on token “>”, invalid AssignmentOperator on :


public class Main
{
  public static String dir = "";
  public static boolean isApplet = false;

  public static int WIDTH = 900;
  public static int HEIGHT = 600;
  public static double FOVY = 70.0D;
  public static double ASPECT = WIDTH / HEIGHT;

  public static boolean mapEditor = false;
  public static boolean freeCamera = false;
  public static int nbLevel = 9;
  public static int nbChalLevel = 3;
  private Controls controls;
  private Render render;
  public static Avatar avatar;
  public static Shaders shaders;
  public static Sounds sounds;
  private long previousTime;
  private double unprocessedSeconds = 0.0D;
  private double secondsPerTick = 0.02D;
  private int tickCount = 0;
  private int frames = 0;
  public static int FPS = 0;
  public static boolean menu = false;
  public static boolean menuInit = true;
  public static boolean dead = false;
  public static long time;
  public static Map map;
  public static String mode = "Story";

  public static String user = "Tim";
  public static int levelSaved = 5;

  public void start() {
    Font.init();

    Shaders.load();
    Shaders.use();

    MapTexture.load();
    BuildList.load();
    this.render = new Render();

    avatar = new Avatar(0.3D, 1.3D, 0.3D);

    this.controls = new Controls();
    sounds = new Sounds();
    Gui.init();
    Menu.init();
    menu = true;
    Menu.menuOpening = true;
    time = 0L;
    sounds.play("back");

    gameloop();
  }

  public void gameloop()
  {
    this.previousTime = System.nanoTime();
    for (; !Display.isCloseRequested(); 
     this.unprocessedSeconds > this.secondsPerTick) <<- - - THIS LINE GIVES OUR BASTARDIOUS ERROR.
    {
      long currentTime = System.nanoTime();
      long passedTime = currentTime - this.previousTime;
      this.previousTime = currentTime;
      this.unprocessedSeconds += passedTime / 1000000000.0D;

      continue;

      tick();
      if ((menu) || (Menu.menuRunning) || (Map.just_loaded)) this.previousTime = System.nanoTime();
      this.unprocessedSeconds -= this.secondsPerTick;
      this.tickCount += 1;
      if (this.tickCount % 50 == 0) {
        FPS = this.frames;
        this.frames = 0;
        this.previousTime += 1000L;
      }
      this.render.draw();
      Display.update();
      this.frames += 1;
    }

    sounds.destroy();
    Display.destroy();
  }

  public void tick() {
    sounds.tick();
    if ((!menu) && (!Menu.menuRunning)) this.controls.tick();

    Gui.tick();

    if ((!menu) && (!Menu.menuRunning)) {
      time += 1L;
      if (Shaders.currentShader == Shaders.shader) Shaders.set("time", time);
      Map.tick();
      avatar.tick();
      if (dead) Timer.restart();
    }
  }

Instead of this:


[...]
-    for (; !Display.isCloseRequested(); 
-     this.unprocessedSeconds > this.secondsPerTick) <<- - - THIS LINE GIVES OUR BASTARDIOUS ERROR.
[...]

You propably wanted this:


[...]
+    while (!Display.isCloseRequested() && this.unprocessedSeconds > this.secondsPerTick)
[...]

Well, I’ve tried, but then the line tick(); gets unreachable code. ::slight_smile:
Quite new to java :I

Yes, because you put a


continue;

just before the Tick();…
continue makes your code stop and continue from the last loop entrance, which is the “while” here.
I’m not quite sure, since I’ve not completly found out what your code wants, but try just leaving it out.

Thank you!

You are so nice. Works now :slight_smile:
Was working on a LWJGL project.

I’m glad to help :slight_smile:

By the way, I admire your World Of Cube :slight_smile:
Its nice.

haha thanks :wink:
People around here read signatures? Cool stuff ;D

(I should upload the most recent verion tho…)

I didnt read your signature, I just knew the name.
:smiley:
I have a suggestion: Jetpacks.

Hm… I’m not working that active on this project anymore… but… dunno…
Some failures in development made me fall on my knees… slopes not working, new terrain generator not working…