B4J Question Compilation error

wl

Well-Known Member
Licensed User
Longtime User
Hi,

I have tis code:

Code: Copy
Public Sub LANSocket_Connected (Successful As Boolean)
    Dim sc As Socket
    If (Successful) Then
        sc = Sender As Socket
        LANStreams.Initialize(sc.InputStream, sc.OutputStream, "LANStreams")
        LANStreams.Write(bufferedData.ToByteArray)
        bufferedData.Clear
        LANInitialized = True
    Else
        'TODO
    End If
End Sub

Within a console application (LANStreams is declared as a private member)

Test compilation is OK, but when I try to compile & run, I get this:

Code: Copy
Parsing code.                          0.00
Compiling code.                        0.01
Compiling debugger engine code.        Error
B4A line: 69
LANStreams.Initialize(sc.InputStream, sc.OutputStream, \
javac 1.7.0_55
shell\src\b4j\example\class_connection_subs_0.java:123: error: ';' expected
_sc = (class_connection.__c.runMethod(false,"Sender",__ref.getField(false, "ba")));Debug.locals.put("sc", _sc)} BA.debugLineNum = 69;BA.debugLine="LANStreams.Initialize(sc.InputStream, sc.OutputStream, \"LANStreams\")";
                                                                                                              ^
1 error

Thanks !
 
Back
Top