Hi guys, it's been a while since i've ben active in the forum, code wise....
I'm stuck in a problem... I'm reading an ini file and have an eror label called "erro", wich gets called if there is any proble accesing the file...But how ca I call the errorlabel upon a condition?
This is my code...
Yes, I know i'm readding teh file 3 times before i use the data...
it's my way of doing things...bare with me on this one..
I'm stuck in a problem... I'm reading an ini file and have an eror label called "erro", wich gets called if there is any proble accesing the file...But how ca I call the errorlabel upon a condition?
This is my code...
Yes, I know i'm readding teh file 3 times before i use the data...
it's my way of doing things...bare with me on this one..
B4X:
Sub LoadINI
ErrorLabel(erro)
FileOpen(c,"LusiGES.ini",cRead)
a=FileRead(c)
a=FileRead(c)
a=FileRead(c)
Nome=StrRemove(a,0,5)
'Here I want to test if the resulting string is equal to a known string (my own name), if not, then should be considered an invalid ini file, and jump to the error label.
If Nome<>"Paulo Sérgio Gomes" Then ' then what???
FileClose(c)
Erro:
Msgbox("Não foi possivel ler" & crlf & "o ficheiro LusiGes.ini","Erro de Leitura.",cMsgBoxOK,cMsgBoxExclamation)
End Sub