Re: [SPELL] Question about objects & owners.

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


>it gives messages to the caster. If the caster gives it away and quits,
>MUD will probably crash (I have not tested this because I assume thats
>what will happen).

Before the desired message, check to see if the pointer is null or not.
This should be common practice with events since things can 'change'  so
easily.  Also, when the object disapears, make a check to see if the person
holding/wielding/carrying/etc the object is the same as the ch pointer (or
if !ch), then send a message to that person saying the item has disapeared.
 Get what I'm saying?

>Is there a way to check to make sure the person that is
>either wielding it or in its inventory is the same as the ch pointer in
>the event structure?

Yeah, grep around in places where you can find out who is carrying
something (ie, the immortal where, or locat object) and you'll get some
ideas.  Don't have any code in front of me, so I cant say off hand.

>OffTopic:
>  To help me with Circle programming, I am looking to pick up a book on
>Data Structures that is well written, and does not introduce multiple
>concepts in single examples. Could anyone point me in the right direction?

You've got me chief.


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