On Friday, October 04, 1996 6:12 PM, Sean P. Mountcastle[SMTP:mountcas@pluto.ee.cua.edu] wrote: > > I've been trying to get players mud mail to save to disk when >they rent. But the problem is the message is of variable length and the >rent file is a binary file. Also, why do the objsave routines read the >object from the saved virtual number? This ruins any strings that were >saved for the player (i.e. a special one shot Sword of XXX, made >especially for XXX). Anyone have any ideas about how to do this without >having to make two separate files (one ascii for strings and another >binary for numerical data)? Should I just save all objects as ASCII files? To save the player's mail will require two steps: 1) Extending the load and save routines for the player objects to include an overide of the object's prototype for the action description of each item. Not too difficult.. Just allocate space for a char field in the save file (convert or delete your rent files) -- use the max length of the string+1 2) Changing the mail system to create an item_note object, rather than the default mail object, as it's vnum won't allow it to save. This will have the side affect of making written notes save, as well. Hope this helps.. -- http://www.polarnet.com/Users/gbarnett/ -- telnet://mud.polarnet.com 4000 -- +-----------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://cspo.queensu.ca/~fletcher/Circle/list_faq.html | +-----------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/18/00 PST