Error message saying im mixing active and static modes

So I had to download the Library for Processing as this is the first time Im using arduino on my laptop (usually do this at uni). and ive gone through all of the steps that arduino actually give us and put what it told me on lines 1 ,2 ,4 also 1, 2 are needed for my criteria for my assignment but it’s telling me that ''It looks like you’re mixing ‘‘active’’ and ‘‘static’’ modes.

please help! ive never needed to use PrintIn(Arduino.List()); in the minimal amount of time ive done this but i was just going by what the website said.

1 import processing.serial.;
2 import cc.arduino.
3 Arduino arduino;
4 printIn(Arduino.List()); //needed this to make it work on laptop
7 int downPin = 8;
8 int knobPin = 0;

9 float angle = -PI/4;
10 PVector location = new PVector(50, 300);
11 boolean shot = false;
15 CannonBall ball;
17 void setup() {
18 size(640, 360);
19 ball = new CannonBall(location.x, location.y);
21 arduino = new Arduino(this, Arduino.list()[4], 57600);
22 arduino.pinMode(downPin, Arduino.INPUT);
23 arduino.pinMode(knobPin, Arduino.INPUT);
24 }
26 void draw() {
27 background(255);
28 noStroke();
29 fill(100, 100, 100, 80);
31 int knobVal= arduino.analogRead(knobPin);//
32 int keypressed= arduino.digitalRead(downPin);//
34 //calculate the angle of the cannon based on mouseY position
35 angle= map(knobPin, 0, knobVal, -PI/2, PI/2);
37 pushMatrix();
38 translate(location.x, location.y);
39 rotate(angle);
40 rect(0, -5, 50, 10);//draw the cannon
41 popMatrix();
43 if (shot) {
44 PVector gravity = new PVector(0, 0.2);
45 ball.applyForce(gravity);
46 ball.update();
47 }
48 ball.display();
50 if (ball.location.y > height) {
51 ball = new CannonBall(location.x, location.y);
52 shot = false;
53 }
55 //when the mouse is pressed
56 if (mousePressed && shot== false) {
57 shot = true;
58 PVector force = PVector.fromAngle(angle);
59 force.mult(10);
60 ball.applyForce(force);
61 }
62 }

but it's telling me that ''It looks like you're mixing ''active'' and ''static'' modes.

You have not defined a noun that it refers to.

The compiler did NOT mumble "something like...". It told you EXACTLY which line it didn't like, and exactly what it didn't like about the line.

You have made it impossible to recreate the messages without a lot of work removing the line numbers.

but i was just going by what the website said.

Well, if it was on the internet, it MUST be completely correct. Just do it. Uh, what web site?

i am extremley new to this and hate programming so I dont particularly know what im going

im sorry about not having the numbered lines i tried to re add them myself the long way but i couldnt seem to add the numbers automatically because im a moron this isnt my forte thats the link that told me what to do

If you are not going to post EXACT code and EXACT error messages, we can't help you.

i dont understand the exact code is there…

i dont understand the exact code is there…

Well, when I copy the “code” you posted into Processing, and try to compile it, I get: unexpected token: 1

and the first line is highlighted.

So, clearly, the code you posted is NOT the code that you are using in Processing.

Good luck with your problem. I am done.

  //calculate the angle of the cannon based on mouseY position
  angle = map(knobPin, 0, knobVal, -PI/2, PI/2);

Mapping the pin number doesn't make sense.

printIn(Arduino.List()); //needed this to make it work on laptop

Executable code must be in a function. The method name is list(), not List(), and the function name is println, not printIn.