[Circle][Code] ACMD(do_saveall)

From: Ramsey Stone (ramseystone@hotmail.com)
Date: 09/26/01


Greetings CircleMUD Coders,

       While working on a mud building a zone last week,
a particular command caught my attention. Unlike the
saveall command on the developer site, this saveall command
required an argument. If I type saveall 12, it would save
EVERYTHING in zone 12. It was quite usefull, instead of
having to type redit save 12 etc. I've created a prototype
of the function, though it dosn't seem to work. Here it
is:

ACMD(do_saveall)
{
int zone = 0;
one_argument(argument, arg);
zone = atoi(arg);
/* Save All Aspects of Zone */
oedit_save_to_disk(zone);
medit_save_to_disk(zone);
zedit_save_to_disk(zone);
redit_save_to_disk(zone);
sedit_save_to_disk(zone);
sprintf(buf, "&CZone %3d saved to disk&n\r\n", zone);
send_to_char(buf, ch);
}

The compiler returns no errors. I tested the command
by adding a string to a room and typing saveall 12. "OLC"
still turned up rooms in zone 12 as unsaved. I deliberately
(yes, I know) crashed the mud to see if it was just something
wrong with the listing. To my disgust, the room appeared as it
was before I had added the string. I have narrowed it down to
that it is the save_to_disk functions. Some help please? Thanks
in advance,

       Ramsey

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/06/01 PST