Android Question Input string was not in a correct format

Discussion in 'Android Questions' started by Richard Goh, Aug 6, 2015.

  1. Richard Goh

    Richard Goh Active Member Licensed User

    I created a function in code module and taking values string. But when I trying to call the function by passing in string value I got this error message. This is the first time I received this error. I did that for many times in the programs. May I know what's wrong with the code? Any advice?

    e.g
    Create function in a code mode lib
    Sub setValue(val1 As String, val2 As String)
    Log(val1)​
    End Sub

    *Call the function in activity

    Type rec(val As String, val2 As String)
    Dim r As rec

    lib.setValue(r.val, r.val2)
     
  2. Richard Goh

    Richard Goh Active Member Licensed User

    Sorry my mistake. There was an extra semi-colon in the end of the code.
    Was used to code in other language syntax and conveniently added with line termination.:p
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice