Working with arrays in B4Ppc was quite straight-foward, but not so easy in B4A...
I have This code:
What it should do? It should take the Table String read from a file, formated to be scv, and place each value into the array...and then erase the current value from the string, comma included...But it is not working, I keep getting an "OutOfBaounds" error...HELP
Msgbox are ther so I can keep track of what is beeing done by the loop...And it seems to be all good,except tha filling of the array..
I have This code:
B4X:
Dim Table As String
Table = File.ReadString(File.DirInternal,"ScoreTable.txt")
Dim Scores() As String
c = Table.IndexOf(Level)
Msgbox(table,c)
For i = 0 To 24
d=Table.IndexOf(",")
Msgbox(d,",")
Scores(i) = Table.SubString2(c,d)
Msgbox(scores(i),"Word")
' c = Table.IndexOf2(",",c+1)
Table = Table.SubString(d)
c = c + 2
Msgbox(table,"String")
'Msgbox(Scores(i),c)
Next
Msgbox are ther so I can keep track of what is beeing done by the loop...And it seems to be all good,except tha filling of the array..