How can I create a scene using setup/draw without triggering the "active and static mode" error?

I have to create a scene for a class project that includes the setup/draw function, but if I try to add anything else to the code, I get either an "active and static mode" error or a "null pointer exception" error.

How do I get around this? I only need the draw function to create a flickering light; the rest is just shapes/loops.

Answers

  • Answer ✓

    Processing's static mode is when we don't use any functions or classes.
    Be careful not to place code, except variable declarations, outside functions!

Sign In or Register to comment.