View Single Post
Old 01-13-2003, 10:38 AM   #2
jornel
Member
 
Join Date: Sep 2002
Location: Canada
Posts: 73
jornel is on a distinguished road
I suspect it has something to do with intermixing standard C library file functions fgets - which doesn't increment the mud's line number variable - with mud file library routines fread_xxx which do.


Questions to ask yourself:
- is the .are file actually opened? by routines which initialize the line number?
- why are you fgetsing into a buffer called line, then never using it?

To help you figure out which fread_xxx() call is causing the bug message, insert your own test bug messages before and after the calls to fread_number() so that you can recognize where the program is.

bug("Test: Before the fgets");
bug("Test: Between fgets and fread"):
etc.

After the problem is diagnosed and solved, you remove the test bugs.

Hope this helps.
jornel is offline   Reply With Quote