quick help

BlitzMax Forums/BlitzMax Beginners Area/quick help

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.

ReadFile is not actually reading data from a file, but is instead opening a file for input, that's why it's returning a stream. You then read from the stream itself, via the stream functions such as "ReadByte", "ReadLine" etc...(check out Modules->Stream in the doc's for all of the functions).

So, you'd go:
global file:TStream
file = ReadFile("the file you want to open here")
print( readline(file))

Readline returns a single (newline or null terminated) string from the specified stream.