Re: Quick Q.

From: Chuck Reed (master@I-55.COM)
Date: 09/04/98


Hmm, after looking at it, maybe this is a better way to do what you wanted.

char *get_name_by_id2(long id)
{
  int i;

  if (id == -1)
          return "";

  for (i = 0; i <= top_of_p_table; i++)
   if ((player_table + i)->id == id)
     return (CAP(str_dup((player_table + i)->name)));
    }
  return "";
}


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



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