I got a bug fix document and heres the text that follows:

More $

  Problem

   It seemed that the $-problem in the previous paragraph gave also
   problems in the act_new()-function, when you get a string with a $
   dollar in it. Perhaps the previous fix was not enough on it's on, with
   this is it.

  Cause

   In act_new(), it's assumed that all pointers are valid.

  Checking

   Take a mortal character, let him say "cast 'bless' $p" for about 40
   times and make sure you have the wiznet-spam option on. If your mud
   crashes you have to apply the following patch.

  Patch

   Check the pointers before using them:

   case 't': i = (char *) arg1;                            break;
   case 'T': i = (char *) arg2;                            break;
   case 'n': i = PERS( ch,  to  );                         break;
   case 'N': i = PERS( vch, to  );                         break;
   case 'e': i = he_she  [URANGE(0, ch  ->sex, 2)];        break;
   etc...

   should become

   case 't': if (arg1) i=(char *)arg1;
             else bug("Act: bad code $t for 'arg1'",0);
             break;
   case 'T': if (arg2) i=(char *)arg2;
             else bug("Act: bad code $T for 'arg2'",0);
             break;
   case 'n': if (ch&&to) i=PERS(ch,to);
             else bug("Act: bad code $n for 'ch' or 'to'",0);
             break;
   case 'N': if (vch&&to) i=PERS(vch,to);
             else bug("Act: bad code $N for 'ch' or 'to'",0);
             break;
   case 'e': if (ch) i=he_she[URANGE(0,ch->sex,2)];
             else bug("Act: bad code $e for 'ch'",0);
             break;
   etc...
             break;
             break;
             break; // BREAK IT! :-)

  Thanks

   Thanks to the guy from primenet for telling me the problem (although
   it was already fixed in our code :-)

Okay I was doing what it was saying until I came to this area in the cases:

case 'p':
                    i = can_see_obj( to, obj1 )
                            ? obj1->short_descr
                            : "something";
                    break;

     How in the heck can I convert this to the format above? I'm stumped.
Thanks for any help you guys or gals can give me.


                                       Dantin



Reply via email to