This snippet i installed, to make ALL clanstorerooms save, no matter if they belong to a clan or not.. the save_clan_storeroom function [or whatever it's called] above do_auction in act_obj.c, for some reason, this is probably intentional [as this is hwo the regular SMAUG code did it], but it writes
#VNUM 21496
the last object put in the room, ch->in_room->last_content, i think.. if this is not what it is, tell me
#END
but when i open the file in a text editor, it just says
#VNUM 21496
#END
no matter what objects i put in there.. [it's flagged correctly, yes]
So, i changed it so it goes through all the objects in the room and saves them with fwrite_obj, and made it display the object name with bug();, so.. it displays the name, yet the file is still blank
when i manually put objects in the file, they load just fine... it must have to do with saving.. any thoughts? if you need any code, tell me.
One thing you may want to check, is the level of the items you're dropping. I've seen some code releases in which there are checks that keep any lvl 100+ object from saving. If you're using oinvoke without the level arg, you'd be invoking them at your level which would in turn not save the item. I've also seen code that protects against this very problem, but it's worth looking at. Try invoking an item with a level arg 'oi boots 50' or buying an item and see if that makes a difference.
As Meerclar said though, posting code when you have a potential 'code' problem is always a wise idea ;-) Just seems logical..
A note on why it saves with in_room->last_content.. The reason it does that, is because it SHOULD check to see if the object should be saved as it's dropped. So when you drop an object it's going to be last_content no matter what. This is smart thinking on the smaug coders part to save the code from needing to loop un-necessarily.
Alright then. I put the bug statement in my version to display the object. it displays the object and then.. i find a blank file, even though fwrite_obj is called...
EDIT: now that i've seen your post, boborak.. i am going back to the default code, but... it still only prints
#VNUM 21496
#END
no matter how many objects i drop or pick up, etc.
Couple of things. You said it's invoked as lvl 65. Is that an immortal level?
Also, seeing your version of fwrite_obj will probably be handy. Giving a link to the SMAUG distro you downloaded would help too. That way we could see the exact code you're working with.
65 is the highest immortal level, and i got my distro of SMAUG from ftpgame.org .. my fwrite_obj is not stock though.. i installed hotboot so i had to change it [oh, and i added value[6] to value[10], so that changes it a little bit. i don't think that caused it though]
I cannot paste my Fwrite_obj.. it's over 6000 chars [my whole post]