Need help with fread_char!

Posted by Toy on Fri 20 Feb 2004 10:41 PM — 6 posts, 21,664 views.

#0
For some reason, all of a sudden, whenever a character logs in, including Imms, any changes made don't seem to load right.

For example I oinvoked 10 torches into my Imm's inventory, then made all my skills 100, and then saved. I checked the player file and it showed the torched and skills saved. Next I attempted to log back in, and upon doing so the Imm's skills were at 0 and he had no torches. While I was logged in, I checked the player file again, and it still showed the skills at 100 and him carrying 10 torches.

I'm sorta stumped because it isn't giving off any bug messages or crashing. I figure I need to to debug, but I'm not sure how to go about it using gdb to find the fread_char error.

-Toy
USA #1
This would happen to me on my Windows Smaug. I'm not sure what caused it, or why it happened. I think there are some topics like this, that say how to solve this. I'm not sure though.
#2
On your Windows Smaug? Has it ever happened with Linux?

-Toy
USA #3
Nope, never. Linux smaug was always fine. Never had character saving problems. Hrm.. Maybe its fwrite_char. I'm not sure.
#4
Alright, I think I may have narrowed my problem down a bit. I've found that if I make any changes to my Imm, such as raising HP, they stay and load after I log back in. It appears that the only things that aren't loading right and items in the inventory and skills.

I'm not sure which of the two, fwrite_char or fread_char, is giving me trouble. Any help would be greatly appreciated.

-Toy
#5
In a strange twist, I was able to solve the problem. I removed a snippet I had added for a login menu, and the problem cleaned itself up. Was probably a CON_STATE problem, seeing as the snippet I removed was in comm.c.

-Toy