[NEWBIE] Updating code

From: NeoStar (neostar@inorbit.com)
Date: 09/08/01


I am trying to use the whois snippet from the CM ftp, in
/code/commands/whois.txt. I'm guesing it's old code because one function is
one I've never seen before. (we are using pl18)
Here's the problem:
-----
act.informative.c: In function `do_whois':
act.informative.c:2047: warning: passing arg 2 of `load_char' from
incompatible pointer type
act.informative.c:2048: warning: implicit declaration of function
`store_to_char'
-----

And here's the code:
-----ACMD(do_whois)
{
   struct char_data *victim = 0;
   struct char_file_u tmp_store;
   skip_spaces(&argument);

   if (!*argument) {
   send_to_char("Who?\r\n", ch);
 } else {
   CREATE(victim, struct char_data, 1);
   clear_char(victim);
   if (load_char(argument, &tmp_store) > -1) {
   store_to_char(&tmp_store, victim);
   *buf = '\0';

   sprintf(buf + strlen(buf), "Level %d %s - %s %s\r\n",
   GET_LEVEL(victim), CLASS_ABBR(victim), GET_NAME(victim),
GET_TITLE(victim));

   send_to_char(buf, ch);
 } else {
   send_to_char("There is no such player.\r\n", ch); }
   free(victim); }}
-----

-Neostar

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/06/01 PST