# Looks like you are mixing "active" and "static" modes

**URL:** <https://discourse.processing.org/t/looks-like-you-are-mixing-active-and-static-modes/38833>\
**Category:** Beginners\
**Created:** [September 17, 2022, 7:47pm UTC](https://discourse.processing.org/t/looks-like-you-are-mixing-active-and-static-modes/38833 "2022-09-17T19:47:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RobM](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@RobM](https://discourse.processing.org/u/RobM)\
**Post date:** [September 17, 2022, 7:47pm UTC](https://discourse.processing.org/t/looks-like-you-are-mixing-active-and-static-modes/38833/1 "2022-09-17T19:47:40Z")

</div>

```auto
void placeRectangle2() {

  myRect = loadImage("myRect.jpg");
  myRect.loadPixels();
  loadPixels();
  for(int j=0;j<height;j++){
    for(int i=0;i<width;i++){
      int loc=i+j*width;
         pixels[loc]=myRect.pixels[loc];
      }        
     } 
    }
  updatePixels(); 
  myRect.updatePixels();  
}

```

updatePixels(); is flagged with “Looks like you are mixing “active” and “static” modes” I cannot find the error??? A previous function that is virtually the same runs without error.

---

<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:** [September 17, 2022, 8:50pm UTC](https://discourse.processing.org/t/looks-like-you-are-mixing-active-and-static-modes/38833/2 "2022-09-17T20:50:18Z")

</div>

Hello @RobM,

> [@RobM](#):
>
> Looks like you are mixing “active” and “static” modes”

This will happen if you do not have complementary opening and closing brackets.

You can highlight the opening bracket and it will show the complementary closing bracket:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/7/c/7c771d05f11d9fcd4e8c23c400d7caafec3a8949.png)

I can see an extra bracket in there.

`:)`

---

<div class="post-metadata">

**Author:** ![RobM](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@RobM](https://discourse.processing.org/u/RobM)\
**Post date:** [September 18, 2022, 10:22am UTC](https://discourse.processing.org/t/looks-like-you-are-mixing-active-and-static-modes/38833/3 "2022-09-18T10:22:07Z")

</div>

Thank you. I can’t believe I missed that.
