send_to_char isn't working for me..

From: William Karp (willk@crl.com)
Date: 05/04/96


Well, just as a disclaimer, I'm not saying that it's a bug, I just seem 
to be using it wrong.
What I'm doing is this.  I'm calling a function from the game loop to do 
some special processing for a desert area.

In the perform_sandstorm function I have a number offor/if statements, 
and I get down to where I want to blind the guy, and I do a send_to_char 
telling this person that I'm blinding him, but it doesn't send the message.

This is the function..
(Another disclaimer:I know it's rough, I just wanted to get the logic
to work intially.)

void perform_sandstorm(void)
{
   const int MaxArray = 2;
   int i;
   struct char_data *vict;
   static int moving_room;
   int rooms[MaxArray][5];

  rooms[0][0] = 2001; rooms[0][1] = 2002; rooms[0][2] = 2003;
  rooms[0][3] = 2004; rooms[0][4] = 2005;

  rooms[1][0] = 3001; rooms[1][1] = 3002; rooms[1][2] = 3003;
  rooms[1][3] = 3004; rooms[1][4] = 3005;

   log("ok, at beginning, after arrays");
   if((moving_room < 0) || (moving_room >= 5))
   {
      moving_room = 0;
   }
   for(i=0;i < MaxArray; i++)
   {

     if(world[rooms[i][moving_room]].people != NULL)
     {
      
for(vict=world[rooms[i][moving_room]].people;vict;vict=vict->next_in_room)
         {
            log("send_to_char");
            send_to_char("The blowing sand is blinding you !\r\n",vict);
         }
     }
   }
   moving_room++;
}



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