Error saying "variable or feild color declared void"

There’s an error saying "variable or feild color declared void" when i already declared it and there's no return variable.

This is my code.

int red = 255;
int green = 0;
int blue = 0;
void color(int sred, int sgreen, int sblue) {
  red = sred;
  green = sgreen;
  blue = sblue;
}
void game() {
  randomSeed(analogRead(A5));
  void color(0,0,255);
  delay(500);
  
}
void setup() {
  pinMode(9,OUTPUT);
  pinMode(10,OUTPUT);
  pinMode(11,OUTPUT);
  void game();
}

void loop() {
  int buttonState = analogRead(A0);
  analogWrite(9,red);
  analogWrite(10,green);
  analogWrite(11,blue);
  delay(80);
}

What do you think void is doing there ?

PS: Don’t post snippets (Snippets R Us!)

And as soon as you fix that error, you will hit it again here:

When you define a function, you declare what type of return value it will provide.

When you call a function, you just use the name of the function.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.