CODE problem [part 2]

From: Homer Simpson (fcolvin@metz.une.edu.au)
Date: 10/02/96


Hiya all,
         After a little advice and a bit of mucking around I changed the
mob_time_trigger function in mobprog.c to the one below. The mud still
crashes, but now only when the time is 5am. (The time my time_prog is set
for on my mob.)

Any ideas?

Homer.

aka Fionn Colvin


void mprog_time_trigger(int time)
{
   struct char_data *mob;
   MPROG_DATA *mprg;
   int r_num = 0;
   int pos = 0;

   for (r_num = time_mobs[pos]; r_num != -1; r_num = time_mobs[++pos]) { 
     mob = read_mobile(r_num, VIRTUAL);
     if (IS_NPC(mob) && (mob_index[mob->nr].progtypes & TIME_PROG))
       for (mprg = mob_index[mob->nr].mobprogs; mprg != NULL; mprg = mprg->next)
         if (mprg->type & TIME_PROG)
           if (time == atoi(mprg->arglist)) {
             mprog_driver(mprg->comlist, mob, NULL, NULL, NULL);
             break;
           }
   } 
   return; 
}
+-----------------------------------------------------------+
| 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