Subj : HW 100.2
To   : PistolGrip
From : Finnigann
Date : Wed Oct 24 2001 07:40 am

-=> PistolGrip wrote to Finnigann <=-

Pi> RE: HW 100.2
Pi> BY: Finnigann to All on Tue Oct 23 2001 10:20 pm

> !include FILE_IO.INC
>
> FOPEN file O_RDONLY "input.dat"
        ^^^^
        OK

>
>  if_false
>      print "\r\n\r\nnError Loading Configuration File - Input.Dat"
>      return
>  end_if

Pi> ### Everything is fine until the next line.  There, you try to open a
Pi> second ### file with the same <filehandle> "file" as the input file.
Pi> You should try ### to use unique filehandles, especially if you need to
Pi> open mulitple files.

> FOPEN file O_CREAT|O_TRUNC "output.dat"
>
> if_false
>    print "\r\n\r\nnError Loading Configuration File - Output.Dat"

Pi> ### There is also an error on the next line.  You are trying to close a
Pi> ### filename, and not the <filehandle> (ie. file) as fclose function
Pi> requires.

>         fclose Input.dat"
>      return
>    print "\r\n\r\nnDue to file error(s) All files closed at this time."
>                   end_if


Pi> Not Bad, "B" :)

Actually it's YOUR B as I cut and pasted heavily from your example.

So the 'file' is the handle that BAJA see it as... A varible, assigned in
the act of opening the input.dat. I need to refer to THAT varible when
manipulating INPUT.DAT ('file' was prolly a bad choice in that case).
Maybe something descriptive would have been a better choice. Like
'Player_list' or 'Game_scores'

Ditto for output.dat.

A gray sliver of light...


... RAM DISK is NOT an installation procedure!
--- MultiMail/MS-DOS v0.40
� Synchronet � Bits-N-Bytes BBS - One Hellova BBS -- telnet://bnb.dtdns.net