Hi
Do you know how I can read a text line by line, like Readline() but with a text$ ?
Exemple of text I would like to read line by line :
** ennemi
Ennemi1;name;id;life;55;100;
Ennemi2;name;id;life;55;100;
Ennemi3;name;id;life;55;100;
Ennemi4;name;id;life;55;100;
Here is my technic :
Function GetTextLine(Text$)
NbLine = 0
dim NewText$[NbLine]
For i=0 to Len(TempoInfo$)
if mid(TempoInfo$,i,1) = chr(10)
inc NbLine
dim NewText$[NbLine]
else
NewText$[NbLine] = NewText$[NbLine] +mid(TempoInfo$,i,1)
endif
next
Endfunction
2) using the array NewText$[] as you want
So, to read it :
For i=0 to NbLine
Line$ = NewText$[i]
// do what you want with the line$
next
3) After using the array NewText$[], don't forget to undim it with
Do you know another way to do that or it's a good method for you ?
Thank you.
AGK2 tier1 - http://www.dracaena-studio.com