I'm receiving an error when running. I think I know WHY, but I don't know how to fix it.
The source of the integers for the array are stored in a string and I am trying to assign those numbers in the string (separated by commas) to the Int array. But I get the following error:
That syntax is not valid as the compiler needs to know the values as literals at compile time.
B4X:
Dim s, sa() As String
s = "343,171,22,22,22,22,22,22,22,22,22,22,22,22,22,64,22,22,22,64,22,64,22,64,22,64,22,64,22,64,22,22,22,64,22,22,22,64,22,22,22,22,22,64,22,22,22,22,22, 22,22,64,22,22,22,64,22,64,22,22,22,64,22,64,22,64 ,22,1520,343,85,22,3666"
sa = Regex.Split(",", s)
Dim ia(sa.Length) As Int
For i = 0 To sa.Length - 1
ia(i) = sa(i)
Next