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.

Hmm, seems like it working, but the "New list" is not showing up in the combo box..

heres how i call it:

Readmoddata("test.txt")


heres the function..

Function Readmoddata(file$)

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


Repeat
strng$=ReadLine(opened)

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

Until Eof(opened)

CloseFile(opened)
End If

End Function


and heres the test.txt file.
blah
blah
blah
blah
New list


everything looks ok to me.