mercredi 3 juin 2015

Unexpected token else, but in "if" there's no semicolon

I'm sure everything is right, but error exists. I don't know why... Here's a part of my code. Error points the string with "else", and this "else" were highlighted by me by double asterisk in both sides. This "highlighting" isn't exist in the real code. The real code isn't working by the error

  If(e==true && e1==true)
  {
    for (i=0; i<l1; i++)
    {
        if (lat.indexOf(st1.charAt(i)) == -1)
        {
            s5=s5+st1.charAt(i);
        }
    }
    for (i=0; i<l2; i++)
    {
        m=st2.charAt(i);
        n=i;
        for (j=i+1; j<l2; j++)
        {
            if (a.charAt(j) < m)
            {
                m=st2.charAt(j);
                n=j;
            }
            if (m != st2.charAt(i))
            {
                st2=st2.slice(0,i)+m+st2.slice(i+1,n)+st2.charAt(i)+st2.slice(n+1,l2);              
            }
        }
    }   
  } 
  **else**
  {

Aucun commentaire:

Enregistrer un commentaire