Problems reading a txt file..

Blitz3D Forums/Blitz3D Beginners Area/Problems reading a txt file..

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I'm trying to read info off a text file, what am i doing wrong here? i get a mav, what i'm trying to do in this case, is read off a text file, and everytime it sees the word "New list" it adds it to a WinBlitz3d combo box..


Function Readmoddata(file$)

If FileType(file$)=1
opened=ReadFile(file$)

strng$=ReadString(opened)
Repeat


If strng$="New list" WB3D_AddGadgetItem(catagory,strng$,0,0)

Until Eof(opened)

CloseFile(file$)
End If

End Function