Hello everyone! I'm using b4a trial 5.20.
The problem: I want to get the integer "2" from the first line of a .txt file, but...
If I write:
Dim number1 As Int
number1 = "2"
log(number1)
Everything is ok. If I write:
Dim line As String
line = TextReader1.ReadLine
TextReader1.Close
Dim number1 As Int
number1 = line
log(number1)
it throws an exception: java.lang.NumberFormatException: Invalid double: "2"
"2" is the number that the text file contains. There is only this number in the file, nothing else.
What could be the problem? Thanks for reading!