Re: [CODE] saving rooms

From: Co-Sysop (dmodem@CYBNETONLINE.COM)
Date: 09/29/97


At 08:28 PM 9/28/97 -0700, Darklord wrote:
>Never assume its a win95 error  "Phallus"/
>I have had pfiles and other files come out to be 0 bytes.  For example.
>lets say you opened up a file to be written to.. something got screwed
>and closed the file..  just an example of what may have happened.
>
>  For some reason.. i dont even remember seeing that patch that saves
>files that way.. my memory is so bad now days from 60+ hrs propgramming
>per week that i dont even know what i was working on at the time.
>
>  What i do know tho.. is one day i had like 100 *.save files in the lib/
>for who knows why.. and believe it or not they were all 0 bytes.. so
>explain that one.
>
>  If it does it again.. id go back throught the code.. checking the sizes
>of the variables.. and of course a glitch that might be within.

After finding the offending fclose(fll); line I removed it but then someone
else mentioned that it was that the line before it didn't have 'fll =' on
it.  So I added the fclose(fll); back on and changed the fopen line above
it.  First thing I noticed was that I "lost" my test piece of meat.   After
that I did some testing with a new piece of meat and it works just fine.  So
I guess the snippet needs to be updated.
change line 115 of roomsave.txt to:
   fll = fopen(buf, "wb");

that should fix the problem unless I am mistaken and we all know how rare a
thing that is ;)
I just hate errors.  I hope everyone has enjoyed this discussion about this
one line that caused a whole mud to crash.  I think it has been resolved now.


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST