[CODE] [COPYOVER] Saving Zones with a Reboot

From: Tony Robbins (tonyr@NWPACLINK.COM)
Date: 01/11/98


as you probably know, copyover is an addon which saves the descriptors to a
file
and then restores these.

I have added the following code to my do_copyover where it suggests...

--There is a medium sized section of code attached here--

      for (entry = olc_save_list; entry; entry = next_entry) {
        next_entry = entry->next;
        if (entry->type < 0 || entry->type > 4) {
          sprintf(buf, "OLC: Illegal save type %d!", entry->type);
          log(buf);
        } else if (entry->zone < 0) {
          sprintf(buf, "OLC: Illegal save zone %d!", entry->zone);
          log(buf);
        } else {
           sprintf(buf, "OLC: Reboot saving %s for zone %d.",
                 save_info_msg[(int)entry->type], entry->zone);
          log(buf);
          switch (entry->type) {
          case OLC_SAVE_ROOM: redit_save_to_disk(entry->zone); break;
          case OLC_SAVE_OBJ:  oedit_save_to_disk(entry->zone); break;
          case OLC_SAVE_MOB:  medit_save_to_disk(entry->zone); break;
          case OLC_SAVE_ZONE: zedit_save_to_disk(entry->zone); break;
          case OLC_SAVE_SHOP: sedit_save_to_disk(entry->zone); break;
          default:      log("Unexpected olc_save_list->type"); break;
          }
        }
      }

-----------------------------------

It sure is pretty code, it's just too bad that it doesn't work.  Anybody have
ideas, as this bug is pretty bad when I just did a zone and (yes, I redit
saved the zone)
rebooted and lost it.

!!!
-B.


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST