mql4 error open parenthesis expected.

To add comments, please log in or register
AdamFuchs
9
AdamFuchs  

Hi. 

i am a beginner and was practicing some basic codes but i faced 14-15 errors. i made them all ok but whatever i do the open parenthesis error wont go away. could you please see where the problem is?

and there is another error,

'else' - illegal 'else' without matching 'if'

please help me with these two errors


   int first=20;
   int second=25;
   int third=30;
   int end= (first+second+third);
   //--------------------------------------
  switch(end)
    {case 75:
       if:(first = 21)
        {Print:"first is 21";}
       else if:(first = 20)
        {Print:"first is 20";}
       else:
        {Print:"case 1: first is something other than 20&21";}
             break;
             
     case 23:Print:"case 2";
       break;
     case 10:Print:"case 3";
       break;
     default:(Print:"no case";
       break;
       
    }
  ExpertRemove();

To add comments, please log in or register