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

**URL:** <https://discourse.processing.org/t/size-cannot-be-used-here-issue-please-help/13696>\
**Category:** Processing\
**Tags:** homework\
**Created:** [August 29, 2019, 10:05pm UTC](https://discourse.processing.org/t/size-cannot-be-used-here-issue-please-help/13696 "2019-08-29T22:05:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kaiskana](https://avatars.discourse-cdn.com/v4/letter/k/5daacb/32.png) [@Kaiskana](https://discourse.processing.org/u/Kaiskana)\
**Post date:** [August 29, 2019, 10:05pm UTC](https://discourse.processing.org/t/size-cannot-be-used-here-issue-please-help/13696/1 "2019-08-29T22:05:43Z")

</div>

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);

}

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [August 29, 2019, 10:24pm UTC](https://discourse.processing.org/t/size-cannot-be-used-here-issue-please-help/13696/2 "2019-08-29T22:24:28Z")

</div>

Hello,

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

🙂

---

<div class="post-metadata">

**Author:** ![Kaiskana](https://avatars.discourse-cdn.com/v4/letter/k/5daacb/32.png) [@Kaiskana](https://discourse.processing.org/u/Kaiskana)\
**Post date:** [August 30, 2019, 1:29am UTC](https://discourse.processing.org/t/size-cannot-be-used-here-issue-please-help/13696/3 "2019-08-30T01:29:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [August 30, 2019, 2:02am UTC](https://discourse.processing.org/t/size-cannot-be-used-here-issue-please-help/13696/4 "2019-08-30T02:02:37Z")

</div>

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

```auto
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](https://www.cytron.io/p-raspberry-pi-3-model-b-plus?sort=r.cireview_id&order=ASC) )

 ![RPI_sizetest](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/e/eec473de192df0eff584cd9a50c88a52200c476e.jpeg)

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [August 31, 2019, 2:20am UTC](https://discourse.processing.org/t/size-cannot-be-used-here-issue-please-help/13696/5 "2019-08-31T02:20:36Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![kfrajer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kfrajer/32/196_2.png) [@kfrajer](https://discourse.processing.org/u/kfrajer)\
**Post date:** [August 31, 2019, 4:53am UTC](https://discourse.processing.org/t/size-cannot-be-used-here-issue-please-help/13696/6 "2019-08-31T04:53:15Z")

</div>

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
