Hi, for incoming udp_packets, i start with a loop to seperate the content, for instance content: "ambient:1000:100:20:60:30:50:5:17:4". Want to seperate first word as 'order' with:
... why is it lost?
thanks
.... ok, needed to use bc.arraycopy .....
B4X:
Dim NOP As Byte ' Number of Points
Dim order() As Byte
For Each s() As Byte In bc.Split(Buffer, ":") 'count ":"
NOP = NOP + 1
If NOP = 1 Then
order = s
Log("order1 : ", order) ' here, 'order' is "ambient"
End If
Log(NOP," : ", bc.StringFromBytes(s))
Log("order2 : ", order) ' here, 'order' is "ambient" when NOP = 1
Next
Log("order3 : ", order) ' here, 'order' is "" - empty
... why is it lost?
thanks
.... ok, needed to use bc.arraycopy .....
Last edited: