Original Post
Just curious as to how I can go about doing this. I have a limited experience with file handling, and here''s what I''m trying to do:
I have a file, textures.dat, that I want to open (It''s a standard text file). First thing I want to do is find out how many lines are in the text file and store that in a variable somewhere. Then, I''m going to want to read all the lines, each in their own buffer, and then close the file. Finally, loop through how many lines there were and create the textures from the buffers.
A sample of the textures.dat file would look like this:
TEXTURE 1 "skins/bob/bob.bmp" TEXTURE 2 "skins/bob/bobs_hat.bmp" TEXTURE 3 "skins/bob/bobs_foot.bmp"I know how to do everything else; Just the whole ''read the line. if it has something, goto the next line. if _that_ line has something, goto the next line. If any lines have nothing, stop and return the number of lines'' part I cant seem to do. Thanks, ~Dwarf