Re: [Circle][Code] ACMD(do_saveall)

From: Kras Kresh (kras_kresh@hotmail.com)
Date: 09/26/01


>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);
>}

You should follow these functions and find out what the parameters are
supposed to be.
this function won't work since each of the save to disk functions are passed
a zone_vnum instead of a zone_rnum.
you'll have to find the real zone instead of the virtual.
heres a convert function for you.

  int j = atoi(arg), tarzone;
  for (tarzone = 0; tarzone <= top_of_zone_table; tarzone++)
    if (zone_table[tarzone].number == j)
      break;

  if (tarzone > top_of_zone_table) {
    send_to_char("Value must be a valid zone.\r\n", ch);
    return;
  }

tarzone will be the zone_rnum so you can pass that to the saves
as for the function entirely working i have no idea since my saveall
function just calls a function that saves everything

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

--
   +---------------------------------------------------------------+
   | 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