Re: [CODE] Events - My ch pointer has been violated! :)

From: ;P (siv@CYBERENET.NET)
Date: 05/07/98


> What happens is that ch is not a valid parameter to the
>
> act("Blah", FALSE, ch, 0, 0, TO_ROOM);
> die(ch, NULL);
>
> and other ch referenced calls in EVENTFUNC(timed_dt).  As soon as event_obj
> is passed to EVENTFUNC, ch is screwed.

i don't have the code you posted in front of me, but i don't think i
remember you type casting the ch *..what i mean is:

EVENT(dt_event)
{
  struct death_trap_data *event_obj = (struct death_trap_data *)
        event_object;
  struct char_data *ch = (struct char_data *)event_obj->ch;
.
.

if you did..then..shrug..

siv


     +------------------------------------------------------------+
     | 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