Android Question What's wrong with Else if statement ?

I get Missing Parameter Error in 2nd line and Syntax Error in 4th Line. Please help me correct this. Edit: Please note Intent is not preserved in code below after posting
Private Sub calc_leadership
If (TL>19.57 && CM > 14.57) Then 'getting Missing Parameter Error
L=3
Else If (TL>19.57 && CM <= 13.17) Then 'getting Syntax Error
L=3
Else If (TL>19.57 && CM >13.17) Then
L=2
Else if (TL<=19.57 && IO <=19.43) Then
L=2
Else if (TL<=19.57 && IO > 19.43 && PS<=12.22) Then
L=2
Else if (TL<=19.57 && IO <= 19.43) Then
L=2
Else if (TL<=18.4 && IO <= 16.67) Then
L=1
Else if (TL<=18.4 && IO > 16.67 && CM >15.1) Then
L=2
Else if (TL<=18.4 && IO > 16.67 && CM <= 15.1 && PS >12.67) Then
L=2
Else if (TL<=18.4 && IO > 16.67 && CM <= 15.1 && PS <=12.67) Then
L=1
Else
L=0
End If
Return L
End Sub
 

JohnC

Expert
Licensed User
Longtime User
"&&" should be replaced with "AND".
 
Upvote 4
Solution
Top