Android Question B4A Input string was not in a correct format

mmieher

Active Member
Licensed User
Longtime User
I am trying to scroll a picture as per an old post, but am getting the above error in the IDE.

B4X:
Sub PDXTimer_Tick
 
    If a1 = -400 Then
        a1 = 400
    End If
 
    ImageView1.Left = a1
    a1 = a1 - 5
    If b1 = -400 Then
        b1 = 400
    End If
 
    ImageView2.Left = b1

   ' Following line is underlined red squiggle
    b1 = b1 - 5
 
End Sub

a1 and b1 are defined as int.

IDE and compiler do not like b1 = b1 - 5. However a1 = a1 - 5 is fine?

If I do this: b1 = b1 - 5px IDE is good with that, but App will not compile.
 

mmieher

Active Member
Licensed User
Longtime User
NEVER MIND!

I must have had something invisible at the end of the line. I inserted a CRLF at the end and all was fine.
 
Upvote 0
Top