Re: [CODE] what on earth is wrong here??

From: Skylar (skylar@ifconfig.intserv.com)
Date: 10/13/96


On Sun, 13 Oct 1996, Søren Peter skou wrote:

> Problem is sometimes when you're in room with spoof, you get teleported
> away, no matter *WHAT* you do, code is as follows :

specials have a built-in, easy to use way to determine themselves, just
define a var like this...

struct char_data *spoof = me;

and every reference inside of the special to spoof will point to the mob
which the special is attached to.  Its much safer than using "ch" which
almost always points to the person who typed something. You can also use 
"me" with objects in the same way (struct obj_data *sword = me;) and 
probably rooms as well, but I have yet to find any use for room specials
so I havnt checked...

> SPECIAL(spoof)
> {  
>   struct char_data *vict;

BTW, this is unused---^^^^, but thats unrelated to your question ;-)



-Sky

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



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