Error with re-using codes

Hello,

I got this code from someone on the internet and it worked great , but I edited it a little bit and now I can't upload because of the errors.
The weirdest is that functions that worked and were uploaded before and that I didn't edited are giving errors now like this one, it is saying it has to few arguments:

void printButton(char* text, int x1, int y1, int x2, int y2, boolean fontsize = false)
{
  int stl = strlen(text);
  int fx, fy;
  
  myGLCD.setColor(0, 0, 255);
  myGLCD.fillRoundRect (x1, y1, x2, y2);
  myGLCD.setColor(255, 255, 255);
  myGLCD.drawRoundRect (x1, y1, x2, y2);
 
  myGLCD.setBackColor(0, 0, 255);
  if (fontsize) {
    myGLCD.setFont(BigFont); 
    fx = x1+(((x2 - x1+1)-(stl*16))/2);
    fy = y1+(((y2 - y1+1)-16)/2);
    myGLCD.print(text, fx, fy);
    }
  else {
    myGLCD.setFont(SmallFont); 
    fx = x1+(((x2 - x1)-(stl*8))/2);
    fy = y1+(((y2 - y1-1)-8)/2);
    myGLCD.print(text, fx, fy);
    }
}

Senne:
the errors.

What errors?

Post ALL of your code.

Arrch:

Senne:
the errors.

What errors?

Post ALL of your code.

Especially the bit the calls the printButton function.

The error is that it says that it has to few arguments , but I didn't edited it?
The full code is to long, so I'm just going to give a piece where the printButton function is used:

{    
  if (refreshAll) 
    {  
     printHeader("Test LED Schema");
     myGLCD.fillRect (1, 15, 318, 37);       //clear "Test in Progress" Banner

     myGLCD.setColor(64, 64, 64);            //Draw Dividers in Grey
     myGLCD.drawRect(0, 196, 319, 194);      //Bottom Horizontal Divider
     printButton("<< TERUG >>", back[0], back[1], back[2], back[3], SMALL);
     printButton("ANNULEER", canC[0], canC[1], canC[2], canC[3], SMALL);     

     printButton ("", stsT[0], stsT[1], stsT[2], stsT[3], true);      //start/stop
     printButton ("-10s", tenM[0], tenM[1], tenM[2], tenM[3], true);  //-10s
     printButton ("+10s", tenP[0], tenP[1], tenP[2], tenP[3], true);  //+10s
     myGLCD.print("START", stsT[0]+6, stsT[1]+15);
     myGLCD.print("TEST", stsT[0]+15, stsT[1]+40);   
    } 
  else
    {
     min_cnt=0;
     
     myGLCD.setColor(0, 0, 0);
     myGLCD.fillRect (1, 15, 318, 99);       //clear test results if any
     myGLCD.fillRect (1, 187, 318, 227);     //clear the "Back" and "Cancel" Buttons
      
     myGLCD.setColor(0, 0, 255);
     myGLCD.fillRect(stsT[0]+5, stsT[1]+5, stsT[2]-5, stsT[3]-40);    //clear 'start'
     setFont(LARGE, 255, 255, 255, 0, 0, 255);
     myGLCD.print("STOP", stsT[0]+15, stsT[1]+15);
     
     myGLCD.setColor(255, 0, 0);
     myGLCD.fillRect (1, 15, 318, 37);
     myGLCD.drawRoundRect (stsT[0], stsT[1], stsT[2], stsT[3]); //red button during test
     setFont(LARGE, 255, 255, 255, 255, 0, 0);
     myGLCD.print("Test in Progress", CENTER, 16);
     setFont(SMALL, 255, 255, 255, 0, 0, 0);
     myGLCD.print("TIME:", 52, 40);
     myGLCD.print("LIGHT OUTPUT (0--255):", 140, 40);
     
   
     while (LEDtestTick)               //test LED and speed up time
     {
      unsigned long currentMillis = millis();
       
      if (myTouch.dataAvailable()) 
        { processMyTouch();}
     
      if (currentMillis - previousMillisLED > 500)    //change time every 0.5s
        {
         previousMillisLED = currentMillis;

         min_cnt++;
         String oldvalue, twelveHR, hrs, HOURS, hrsPM, mins, Minutes, AMPM;
         int hours = min_cnt/60;
         int minut = min_cnt%60;

         if (hours<12){AMPM="AM";}                              //Adding the AM/PM suffix
           else{AMPM="PM";}         

         HOURS=hours;
         hrsPM=hours-12;
         if (hours==0){hrs=12;}                             
           else { if ((hours>=1)&&(hours<=9)){hrs=" "+HOURS;}      //keep hours in place
             else { if ((hours>=13)&&(hours<=21)){hrs=" " +hrsPM;} //convert to 12HR
               else { if ((hours>=22)&&(hours<24)){hrs=hrsPM;}
                 else { if (hours==24){hrs=12;}   
                   else{hrs=HOURS;}}}}}

         mins=minut;                                            //add zero to minutes
         if ((minut>=0)&&(minut<=9)){Minutes="0"+mins;}
           else {Minutes=mins;}
      
         oldvalue=twelveHR;
         twelveHR=hrs+':'+Minutes;
         if ((oldvalue!=twelveHR)||refreshAll)
           {char bufferCount[9];
            twelveHR.toCharArray(bufferCount,9);
            setFont(LARGE, 255, 255, 255, 0, 0, 0);               
            myGLCD.print(bufferCount, 7, 55);
            char bufferAMPM[3];
            AMPM.toCharArray(bufferAMPM,3);
            myGLCD.print(bufferAMPM, 90, 55);
           }
                  
         setFont(SMALL, 0, 150, 0, 0, 0, 0);
         String sled = "Groen:  " + String(grled_out) + " " + " ";
         char bufferS[11];
         sled.toCharArray(bufferS, 11);
         myGLCD.print(bufferS, 145, 55);

         setFont(SMALL, 255, 0, 0, 0, 0, 0);
         String rled = "Groen:   " + String(rled_out) + "  " + " ";
         char bufferR[11];
         rled.toCharArray(bufferR, 11);
         myGLCD.print(bufferR, 145, 67);
         
         setFont(SMALL, 255, 255, 255, 0, 0, 0);
         String wled = "Wit: " + String(wled_out) + " " + " ";
         char bufferW[11];
         wled.toCharArray(bufferW, 11);
         myGLCD.print(bufferW, 145, 79);
         
         setFont(SMALL, 9, 184, 255, 0, 0, 0);
         String bled = "Blauw:  " + String(bled_out) + " " + " ";      
         char bufferB[11];
         bled.toCharArray(bufferB, 11);
         myGLCD.print(bufferB, 235, 55);      
         
         setFont(SMALL, 58, 95, 205, 0, 0, 0);
         String rbled = "Royal: " + String(rbled_out) + "  " + " ";
         char bufferRB[11];
         rbled.toCharArray(bufferRB, 11);
         myGLCD.print(bufferRB, 235, 67);
        
         setFont(SMALL, 224, 102, 255, 0, 0, 0);
         String uvled = "Uv: " + String(uvled_out) + "  " + " ";
         char bufferUV[11];
         uvled.toCharArray(bufferUV, 11);
         myGLCD.print(bufferUV, 235, 79);        
         
        
         LED_levels_output();
         checkTempC();
         TimeDateBar();
         }
      }
    } 
}

Nobody who knows it?

Senne:
Nobody who knows it?

I'm still waiting for you to post your WHOLE sketch. If it doesn't fit in a single post, use the "Additional Options" link and attach the file.

I now identify this as part of the Jarduino aquarium controller code - correct ?

This is a fairly complex code utilising a TFT + Touch screen and all of the associated code.

I got this code from someone on the internet and it worked great

I would suggest that you revert back to the original code, which worked, and then make small changes checking at each step that it still compiles and works.

I can not see anything obviously wrong with what you have provided, but you haven't provided all of your code so it is difficult to tell where you have made the error.