Saved Rooms

From: The Dark One (naxos@tiac.net)
Date: 12/15/96


Hello friends,

 I was considering the earlier talk about saved rooms.

 I seem to be inept in this matter, though I am tring hard :).

okay....

o I started my defining a ROOM_SAVE flag...so far so good.

o I went to db.c and at the end of boot up put the function
  I wanted to call to load the rooms saved objs..save_load()

o in houce.c (I put it here for convienance) I put save_load()

void save_load(void)
{
  int i;
  extern int top_of_world;

  for (i=0; i<=top_of_world; t++)){
    if(IS_SET(ROOM_FLAGS(i), ROOM_SAVE))
      load_room_obj(i);  /*function I want to load objs to room*/
  }

}

o also in house.c i put load_room_obj()

load_room_obj(int i)
{

 I need to check if a file for this room exits
  in the format "vnum.save"

 if does not exist return else load all objs into room.

}

o also need a save function

where do I put it so its updates as time goes on?

how do I make a file if none exists

how do i deal with objs in objs ?

and finaly I need to save all objs in room into the before mentioned
file ...


Any help would be appreciated.

-Thanks friends.
+-----------------------------------------------------------+
| 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