[Circle] [Code] Saving location trouble

From: DJ Pure (pure@ozramp.net.au)
Date: 11/21/96


G'day all.

I'm trying to get it so that when a player types QUIT, they drop their eq
(which is standard stock code procedure) but also they 'remember' the last
position they were in, so they can 'return' there when they come back.

I've done the following little bit, but it doesn't seem to be working ..
in <act.other.c>

ACMD(do_quit)
{
[snip snip]
...
[near the bottom of that function. ..]
/* Added these two lines in. This way, the player quits in the room they
are in, they
   then can restart in the same place as when they left */

   save_room = ch->in_room;
   ch->player_specials->saved.load_room = save_room;

/* The rest is the same from the stock..*/
   if (free_rent)
      Crash_rentsave(ch, 0);
    extract_char(ch);		/* Char is saved in extract char */
...

Any suggesstions peoples? I've spent a lot of time on this and it's bugging
the hell out of me.
Also, I've changed this too ..

<same file, act.object.c>
ACMD(do_save)
{
[snip snip]

save_char(ch, IN_ROOM(ch));	/* Added this line. I wanted it to save in
current room they are in */
  //save_char(ch, NOWHERE);	// Took this line out. 
  
  // The rest is the stock code .. unchanged ...
  Crash_crashsave(ch);
  if (ROOM_FLAGGED(ch->in_room, ROOM_HOUSE_CRASH))
    House_crashsave(world[ch->in_room].number);

As always, thank you kindly in advance for all help. All flames go to the
recycling bin.

Jussy from Down Under
+-----------------------------------------------------------+
| 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