Bug? A weird one

JackKirk

Well-Known Member
Licensed User
Longtime User
A weird one
B4X:
    Dim Gen_files_to_process As Int = 3

    If File.Exists(File.DirInternal, "error_msg.txt") Then
                
        'do stuff'
        
    End If

    If Gen_files_to_process Then
    
       'do more stuff
    
    End If

I accidentally wrote the above (well there was a lot more but this is the outline).

When compiled with Debug it came back wuth

java.lang.RuntimeException: Cannot parse: 0 as boolean

BUT it was pointing to

If File.Exists(File.DirInternal, "error_msg.txt") Then

NOT

If Gen_files_to_process Then

Took me a while to realise what was wrong.
 
Top