Function Bug: Solved

Function Bug: Solved

Is this a bug? I cannot get this function to work.

  1. int TEST(int counter)
  2. {
  3. if(counter == 0)
  4. {
  5.     return counter;
  6. }
  7. else
  8. {
  9.     counter=counter - 1;
  10.     thisapp.TEST(counter);
  11. }
  12. }

The error is missing return statement