# Syntax Error Output

**URL:** <https://discourse.processing.org/t/syntax-error-output/4261>\
**Category:** Coding Questions\
**Created:** [October 8, 2018, 9:44pm UTC](https://discourse.processing.org/t/syntax-error-output/4261 "2018-10-08T21:44:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Tex](https://avatars.discourse-cdn.com/v4/letter/d/858c86/32.png) [@Daniel\_Tex](https://discourse.processing.org/u/Daniel_Tex)\
**Post date:** [October 8, 2018, 9:44pm UTC](https://discourse.processing.org/t/syntax-error-output/4261/1 "2018-10-08T21:44:14Z")

</div>

I am getting this error “SyntaxError: Expected ; but found {” Is there any way I can fix this error? The error only shows when I save the file.

---

<div class="post-metadata">

**Author:** ![Dennis](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/dennis/32/1111_2.png) [@Dennis](https://discourse.processing.org/u/Dennis)\
**Post date:** [October 9, 2018, 11:22am UTC](https://discourse.processing.org/t/syntax-error-output/4261/2 "2018-10-09T11:22:17Z")

</div>

Hi Daniel\_Tex, the error appear when saving… but it run? can you post code?

---

<div class="post-metadata">

**Author:** ![jb4x](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jb4x/32/789_2.png) [@jb4x](https://discourse.processing.org/u/jb4x)\
**Post date:** [October 9, 2018, 12:09pm UTC](https://discourse.processing.org/t/syntax-error-output/4261/3 "2018-10-09T12:09:18Z")

</div>

You forgot a “;” somewhere.

---

<div class="post-metadata">

**Author:** ![Daniel\_Tex](https://avatars.discourse-cdn.com/v4/letter/d/858c86/32.png) [@Daniel\_Tex](https://discourse.processing.org/u/Daniel_Tex)\
**Post date:** [October 10, 2018, 12:11am UTC](https://discourse.processing.org/t/syntax-error-output/4261/4 "2018-10-10T00:11:19Z")

</div>

Here is my code, note that I am using p5.js. And the error only shows when the sketch has been saved.

```auto
void setup() {
   size(600,600,1);
   noStroke();
   rectMode(CENTER);
    textAlign(CENTER,CENTER);
   textSize(20);
};

```

---

<div class="post-metadata">

**Author:** ![Dennis](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/dennis/32/1111_2.png) [@Dennis](https://discourse.processing.org/u/Dennis)\
**Post date:** [October 10, 2018, 6:20am UTC](https://discourse.processing.org/t/syntax-error-output/4261/5 "2018-10-10T06:20:45Z")

</div>

Hi Daniel\_Tex, in p5.js you must use a different syntax:

```auto
function setup() {
  createCanvas(600, 600,P2D);
  //createCanvas(600, 600,WEBGL); 
  noStroke();
  rectMode(CENTER);
  textAlign(CENTER, CENTER);
  textSize(20);
}

```

---

<div class="post-metadata">

**Author:** ![jb4x](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jb4x/32/789_2.png) [@jb4x](https://discourse.processing.org/u/jb4x)\
**Post date:** [October 10, 2018, 7:17am UTC](https://discourse.processing.org/t/syntax-error-output/4261/6 "2018-10-10T07:17:43Z")

</div>

You have a `;` on the last line that shouldn’t be there.
