# Can't call simple function - missing semicolon syntax error

**URL:** <https://discourse.processing.org/t/cant-call-simple-function-missing-semicolon-syntax-error/32420>\
**Category:** Beginners\
**Created:** [September 26, 2021, 5:13am UTC](https://discourse.processing.org/t/cant-call-simple-function-missing-semicolon-syntax-error/32420 "2021-09-26T05:13:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chadmeistr](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chadmeistr/32/14553_2.png) [@Chadmeistr](https://discourse.processing.org/u/Chadmeistr)\
**Post date:** [September 26, 2021, 5:13am UTC](https://discourse.processing.org/t/cant-call-simple-function-missing-semicolon-syntax-error/32420/1 "2021-09-26T05:13:40Z")

</div>

Here is some code I am playing with, but it keeps giving me an error 'Syntax error - missin operator, semicolon or"}" near 2

```auto
void setup() {
  size(200, 200);
}

void sum(int a, int b, int c) {
  int total = a + b + c;
  println(total);
}

sum(2, 3, 5);

```

---

<div class="post-metadata">

**Author:** ![Chadmeistr](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chadmeistr/32/14553_2.png) [@Chadmeistr](https://discourse.processing.org/u/Chadmeistr)\
**Post date:** [September 26, 2021, 5:23am UTC](https://discourse.processing.org/t/cant-call-simple-function-missing-semicolon-syntax-error/32420/2 "2021-09-26T05:23:52Z")

</div>

OK, I fixed this. Incase any others are trying out code from Dan Shiffman’s Learning Processing.

I had to call the sum function within the setup() function call.
