unexpected token

edited October 2013 in Questions about Code

I guess this a newbie questions, as I'm starting to program with Processing.

Seems odd to me but I get an "unexpected token: void" error, referring to the "void setup(){" token. What's wrong ? See picture in link below:

https://www.dropbox.com/s/rn7dlyxpjdnjtxl/UnexpectedTokenError.png

Answers

  • By the way, the very same code runs on Processing for iPad... :(

  • you're missing a semi colon on the end of your "float i,g,k" line

    post the code if you want people to help. posting pictures of your code just means people having to retype stuff.

  • Thanks koogs.

    Here's the code: now it is running fine:

    float i,g,k;
    
    void setup(){
    
      size(600, 400);
      smooth();
      stroke(255);
      i=random(255);
      g=random(255);
      k=random(2);
    }
    
    void draw(){
      float radium=random(100);
      fill(random(250),i,g);
      ellipse(mouseX,mouseY,10,10);
    }
    
Sign In or Register to comment.