CODE: race

From: Tim Marks (wickwire@earthlink.net)
Date: 08/13/99


Ok why doesnt this work? I do not have any satisfactory debugging tools
available to me. So I have used some simple "Got here!" statments. When a
character creates It gets as far as "Got Here!0 and then disconnects the
character. It gives the syserr: SYSERR: no valid target to act()!
I do not know circle code well enough to figure out what is going on. Where
the error message appears is in the act function where it is checking
whether or not it is a character, mob, and in a room that does not equall
NOWHERE and then  setting the to variable to some value that I do not know
what it is. If it doesnt fit those requirements it sends the error message.
I cannot figure out where act is being called in my code. Though I have not
done a full trace of all the functions used here. Any help is appreciated.
Also this is the code added by instructions for adding races. It is
instructions for an older patch level. If there are any other errors with
this code that I do not know of please tell me so that I can fix it.

case CON_QCLASS:
    if ((GET_CLASS(d->character) = parse_class(*arg)) == CLASS_UNDEFINED) {
      SEND_TO_Q("\r\nThat's not a class.\r\nClass: ", d);
      return;
    }
    SEND_TO_Q(race_menu, d);
    SEND_TO_Q("\r\nRace: ", d);
    STATE(d) = CON_QRACE;
    SEND_TO_Q("Got here!0", d);
    break;

  case CON_QRACE:
    SEND_TO_Q("Got here!1", d);
    if ((GET_RACE(d->character) = parse_race(*arg)) == CLASS_UNDEFINED) {
    SEND_TO_Q("Got here!2", d);
      SEND_TO_Q("\r\nThat's not a race.\r\nRace: ", d);
      return;
    }
    SEND_TO_Q("Got here!3",d);
    if (GET_PFILEPOS(d->character) < 0)
      GET_PFILEPOS(d->character) = create_entry(GET_NAME(d->character));
    init_char(d->character);
    save_char(d->character, NOWHERE);
    SEND_TO_Q(motd, d);
    SEND_TO_Q("\r\n\n*** PRESS RETURN: ", d);
    STATE(d) = CON_RMOTD;

    sprintf(buf, "%s [%s] new player.", GET_NAME(d->character), d->host);
    mudlog(buf, NRM, LVL_IMMORT, TRUE);
    break;


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



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