Help Int function

 
Hello,
   I am new to coding and to this forum and am seeking help with the below code: 

Trying to trouble shoot what i did wrong 

I am receiving  the error     'int' - semicolon expected  


Any ideas would be very helpful
thank you 
void OnStart()

int dayoftheweek = DayOfWeek();
bool dayoftheweek() 
{  
     if (dayoftheweek() != 0)
       {return true; }
       
       
       if (dayoftheweek()!= 5)
       {return true;}
       
       
       if (dayoftheweek()!= 6)
       {return true;}
       
      
       return false; 
       }

       


 
void OnStart()

int dayoftheweek = DayOfWeek();
bool dayoftheweek()       

The function must be declared outside of OnStart().

You cannot declare a function within another function.

OnStart() requires {}

Documentation on MQL5: Constants, Enumerations and Structures / Named Constants / Predefined Macro Substitutions
Documentation on MQL5: Constants, Enumerations and Structures / Named Constants / Predefined Macro Substitutions
  • www.mql5.com
//| Expert initialization function                                   | //| Expert deinitialization function                                 | //| Expert tick function                                             | //| test1                                                            |...
 
void OnStart()   

int dayoftheweek = DayOfWeek();       
bool dayoftheweek() 

You can not define a function inside a function. OnStart has no open, body and closing brace.
Reason: