Re: Long Message follows

From: Jaime Moraga (jim@moai.usach.cl)
Date: 10/24/94


> From: Jeffrey Daro <jdaro@netcom.com>
> Subject: Long Message follows
> To: Circle_List <circle@pvv.unit.no>
> 

> 	Howdy, all!  I am working on a thin_ice special procedure, that 
> will drop the players in a room to another room as if they have fallen 
> through thin ice.  I used a case statement, so that the actions are not 
> always the same, kind like a fido, saying different things in different 
> order.  Anyway, I compiled the code, and it compiled fine, I ran the mud 
> and it shows the room has a special proc (in room stat) but the code 
> never activates.  I am sending along a copy of the code.  Could anyone 
> help me out?  I know the declarations for the if loop and *victim are 
> missing, i added them in after I sent this, sorta. That is not the 
> problem anyway.
> 

> 
> SPECIAL(thin_ice)
> {
>  
>    if (cmd)
>       return(0);

 the one way this precedure is called is with cmd != 0, then... it will always
return a 0... and never execute... you'd try deleting the "if .." clause, and
the code will run every time the player send a command... (very disturbing...
just like walking on thin ice (: )
look on interpreter.c and the routine "special" for a better understanding of
the way the special procedures are triggered.

  
> 
>    switch (number(0, 60)) {
>    case 0:
>       send_to_room("A blistering wind blows from the north.\n\r", 
> ch->in_room);      
>       return(1);
>    case 1:
>       send_to_room("The ice crackles under your weight.\n\r", 
[deleted.]
> -----------------------------------------------------------------------------
> |  Jeff - Daro@Saturn.Rowan.Edu    |                                          
> |         JDaro@Netcom.Com         | If today is the first day of the rest of 
> |----------------------------------| my life, what was yesterday?             
> |  T A Z M A N I A                 |                                          
> |  Ukko.Rowan.Edu 5000             |                                         
> -----------------------------------------------------------------------------
> 
> 
  Jim 

jim@moai.usach.cl



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