Size() cannot be used here issue. Please Help!

Hello, I am currently trying to make some artwork for my media class. My professor is having us make the size with a width 1280px, and a height 720px. When starting to write the code that I would be using, I got an error message saying that the size() could not be used. I’m not sure why this error appeared, because as far as I am aware there are no issues with my syntax. However, it could be that there is an issue that I am unaware of, as I am still learning how to code with Processing. Help would be appreciated!

This is my code btw:

void setup() {
size(1280,720);

}

void draw(){
background(0);
ellipse(mouseX,mouseY,100,50);

}

Hello,

It works fine with Processing 3.5.3 on a Windows 10 PC.

:slight_smile:

Is there any way to make it work on Mac? I don’t have access to a Windows computer

sorry not have that hardware, and i read already that some Mac systems had problems using size() ( but when using it in a unusual way )

-a- is that your very first run of processing 3.5.3 IDE on this computer?
-b- did you try any of the included examples and all failed same?
-c- much more detail about the system version would be good
-d- and a picture of the processing IDE window with the error
-e- and please post code using the </> from the editor menu so it looks like

void setup() {
  size(1280, 720);
}

void draw() {
  background(0);
  ellipse(mouseX, mouseY, 100, 50);
}

here a snapshot how your code runs ( on my computer LOL )

This runs fine on macOS 10.12.6 / Processing 3.4

Are you sure that your sketch is a Java sketch, and it doesn’t say something like “p5.js” or “Python mode” in the upper right?

What version of macOS, and what version of Processing?

An additional suggestion is to run any of the examples that comes with Processing and confirm they work. If you get an error, please provide the exact error message and tell us what demo you used for your testing. Processing version and exact OS as well. From what you posted above, the code seems fine.

Kf

1 Like