Hi, could some one please explain why the program stops with a 'java.lang.ArrayIndexOutOfBoundsException: length=0; index=0' on the line containing N(i) = tim0, and if that line is rem'd out the next line V(i) = cons, I need to get the variables to put in a Bar chart any idea's would be gratefully accepted, many thanks
Both of them are defined in the Process_Globals as
Both of them are defined in the Process_Globals as
B4X:
Public N() As String
Public V() As Double
B4X:
For i = 0 To 99
Dim str As Map = results.Get(i)
Dim strVar As String = str.Get("interval_end")
Dim strArray() As String=Regex.Split("T",strVar)
Dim TextExtract As String=strArray(0)
from=TextExtract
cons = str.Get("consumption")
tim0 = str.Get("interval_start")
Dim strVar As String=tim0
Dim strArray() As String=Regex.Split("T",strVar)
Dim TextExtract As String=strArray(1)
Dim strArray() As String=Regex.Split("Z",TextExtract)
Dim TextExtract As String=strArray(0)
Dim strArray() As String=Regex.Split(":",TextExtract)
Dim TextExtract As String=strArray(0) & ":" & strArray(1)
tim0=TextExtract
tim1 = str.Get("interval_end")
Dim strVar As String=tim1
Dim strArray() As String=Regex.Split("T",strVar)
Dim TextExtract As String=strArray(1)
Dim strArray() As String=Regex.Split("Z",TextExtract)
Dim TextExtract As String=strArray(0)
Dim strArray() As String=Regex.Split(":",TextExtract)
Dim TextExtract As String=strArray(0) & ":" & strArray(1)
tim1=TextExtract
N(i) = tim0
V(i) = cons
AddRow(Array As String(from, tim0, tim1, cons))
Next