There is probably a very simple answer to my question. I've never actually written or read a file in a language before(I usually open the file using a control OOP like). So could somebody help me out with this please. I'm trying to read all the strings from a file, line by line, and then display them. I know this code is wrong, but its what i've been using as a simple test:
GoSub Init
Load("Media\test.sys")
Init:
Bg = RGB(0, 255, 0)
Sync On : Sync Rate 0 : Backdrop On : Color Backdrop Bg : Ink Bg, Bg : Hide Mouse
Return
`####################################################################################
`Load Function
`Loads A Data File. Data Stored Includes, Map(s), Texture(s) and Light Information
`####################################################################################
Function Load(File$)
Open To Read 1, File$
Read String 1, File$
Text 0, 0, File$
Sync
Wait Key
Read String 1, File$
Text 0, 0, File$
Sync
Wait Key
Read String 1, File$
Text 0, 0, File$
Sync
Wait Key
EndFunction
Eventually i want that function to load all of my level data. When i run that function the first line in the file displays fine. After that i get a lime green screen(I havent tested the theory but id imagine its that colour because of the ink setting). If i then press Esc to try and quit the program i get a GPF. Could somebody give me a commented example of how to do this please.
Thnx,
¥öü ®å§Ë tHË ß|å�Ë, ¥öü måkË tHË ÇHåñgË, ¥öü ®Ëå®åñgË mË tî|| î'm §åñË