Computer Science Canada

File I/O help

Author:  ShadowStorm [ Thu May 01, 2003 1:20 pm ]
Post subject:  File I/O help

i have a file with about five lines in it

when i try to input the file i only get the first line.. i need help Sad

this is what i have :

code:

open : Mission1Briefing, "Mission1.txt", get
get : Mission1Briefing, Briefing :*
close : Mission1Briefing

put Briefing
[/code]

Author:  Catalyst [ Thu May 01, 2003 1:36 pm ]
Post subject: 

code:
open : Mission1Briefing, "Mission1.txt", get
get : Mission1Briefing, Briefing :*
close : Mission1Briefing

put Briefing


is only retrieving the first line beacuse it is only being called once

code:
open : Mission1Briefing, "Mission1.txt", get

loop
exit when eof(Mission1Briefing)
get : Mission1Briefing, Briefing :*
end loop

close : Mission1Briefing

put Briefing


for this to work youll need an array of briefing variables, with each one storing one line

Author:  ShadowStorm [ Fri May 02, 2003 12:18 pm ]
Post subject: 

thanx alot...


: