![]() |
|
doubt reading file - Printable Version +- LCKB (https://lckb.dev/forum) +-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109) +--- Forum: Programmers Gateway (https://lckb.dev/forum/forumdisplay.php?fid=196) +---- Forum: Coders Talk (https://lckb.dev/forum/forumdisplay.php?fid=192) +---- Thread: doubt reading file (/showthread.php?tid=1939) |
- soryjero - 06-09-2013 hi, now i am trying to read a file, but the problem is that at the start of the file, you can the last index of the pet/item/skill... and the really problem is that at the start i can read, for example 400, but there are only 50 notices/pets/skills and i dont know how to use EOF because i use this to open file: ofd.InitialDirectory = My.Computer.FileSystem.SpecialDirectories.Desktop ofd.Filter = "file|file*.[CeNsOrEd]" result = ofd.ShowDialog If ofd.FileName <> Nothing Then Dim fs As New FileStream(ofd.FileName, FileMode.Open) Dim br As New BinaryReader(fs) so i dont know how to read until the end of file. could anyone help me please? thanks in advance - Koko - 06-09-2013 Im not familiar with visual basic (i assume this is what you are using?), but what about a while loop? "While the index read isnt the one from the beginning (in other words, the last one), read the file." - soryjero - 06-09-2013 Im not familiar with visual basic (i assume this is what you are using?), but what about a while loop? "While the index read isnt the one from the beginning (in other words, the last one), read the file." yes, i use vb. you are right. i havent thought on that. i think that i also have to put a condition because index go from 1 to 50 and then jump to 200, so i think i also have to put a condition to compare index of the item with the number i get at the start of the file. thanks, i will try it ![]() |