Why doesn't my function work ?

Hi! I am a newbie programmer, and i have a simple question. I would like to make my project and simplify it by splitting it in external functions.

But i have problem, because this functions does not change the value of variables or write something in serial monitor. Why? There is a simple example:

  int variable = 15;
  
  void function()
    {
    Serial.println("I like green tea.");
    variable = 420;
    delay(10000);
    }
    

  void setup ()
  {
   Serial.begin(9600); 
  }

  void loop()
  {
   void function();
   Serial.println(variable);
   delay (1000);
  }

It seems that this "function" don't work. Why? I read some articles, but i couldn't find solution myself. Thanks for help!

For a function to work, you have to call it, not provide a prototype.

“delay()” is also a void function.
Can you see how it is called is different to how you’ve tried to call your function?

Why doesn't my function work ?

If you wish to invoke the function, you need code like...

void loop()
{
    function() ;   // this calls the function
    // ... other stuff
}

Thank you very much! This was so easy, and i tried to repair it all the yesterday evening. Stupid me :).