I would make sure that when your opening these files you do a check:
    if ( ( fp = fopen( strsave, "w" ) ) == NULL )
     {
          bugf( "Error opening: %s", strsave);
          return;
     }
and then when closing them, if theres possiablys that they are already
closed add:
    if (fp)
        fclose(fp);

That should stop your mud from crashing on those utilitys.


----- Original Message -----
From: "Matthew Martin" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, March 20, 2003 1:54 PM
Subject: fclose(fp)


> Alright, the crashes in my mud were coming from fclose(fp). All I did was
> comment them out, and everything seems to be working just fine. Characters
> are saved and loaded correctly, and there are no serious faults.
>
> What I'd like to know is, is there a reason the fclose isn't working
right?
> Do I really need to have them in there? As I said, everything -seems- to
be
> working fine, but I don't want to leave them commented out and have it
lead
> to problems in the future.
>
> Thanks again to all you guys who helped me debug my load_char function!
>
> -UD
>
>
>
>
>
> _________________________________________________________________
> The new MSN 8: smart spam protection and 2 months FREE*
> http://join.msn.com/?page=features/junkmail
>
>
> --
> ROM mailing list
> [email protected]
> http://www.rom.org/cgi-bin/mailman/listinfo/rom
>


Reply via email to