Start a new topic

Another syntax error

I am having a syntax error on the following code, can anybody correct me?


if(va6.val==1)

{

if (va0.val>>va2.val)

{

va7.val=va0.val-va2.val/2

va5.val=va0.val-va7.val

else

va7.val=va2.val-va0.val/2

va5.val=va2.val-va7.val

}

if (va1.val>>va3.val)

{

va7.val=va1.val-va3.val/2

va6.val=va1.val-va7.val

else

va7.val=va3.val-va1.val/2

va6.val=va3.val-va7.val

}

}

Thanks


Forget it I found it space in the second IF

That was not the only error but with the trial/error method i found them all and i am now passing the syntax check


if(va6.val==1)

{

if(va0.val>va2.val)

{

va7.val=va0.val-va2.val

va7.val=va7.val/2

va4.val=va0.val-va7.val


}else

{ va7.val=va2.val-va0.val/2

va4.val=va2.val-va7.val

}

if(va1.val>va3.val)

{

va7.val=va1.val-va3.val/2

va7.val=va7.val/2

va5.val=va1.val-va7.val


}else

{ va7.val=va3.val-va1.val/2

va5.val=va3.val-va7.val

}

}

Your first was missing necessary braces before and after your else

Login or Signup to post a comment