incbin problem
BlitzMax Forums/BlitzMax Programming/incbin problem
| ||
| Hi ! It seems to be not possible to use an incbin file with openfile ? it seems not work here : note 'end.txt' is an classic text file edited with notepad.
Incbin "media/end.txt"
Local f:TStream
f = OpenFile ("incbin::media/end.txt")
If f = Null Then RuntimeError ("not work !")
Could you correct me ! Thanks ! |
| ||
| LoadText() should work. Note, you'll also have to import RamStream if you are using Framework... |
| ||
| Thanks Brucey for this command, but with it how to extract the data (to read line by line the file) ? Is it a stream ? Is there an example somewhere (nothing into the bmax documentation) ? from my previous code : While Not Eof(f) t$ = ReadLine (f) Wend |
| ||
| ok i've just updated my code to parse/read a return string. Thanks for your help Brucey ! |
| ||
| ReadFile should work. OpenFile may not because it permits both reading and writing. I'm quite sure you won't be able to write to Incbin files. |
| ||
| "ReadFile should work" This is true. Thanks Gfk. |