Re: apology

jelson@blaze.cs.jhu.edu
Date: 02/09/94


> now im having a problem with a newbie function...very basic...soe far gives
> same equip to every newbie...

[...]
>        obj1 = read_object(3104, VIRTUAL);
>        obj2 = read_object(7090, VIRTUAL);
>        obj3 = read_object(3042, VIRTUAL);
>        obj4 = read_object(7202, VIRTUAL);
>        obj5 = read_object(3032, VIRTUAL);
>        obj_to_char(obj1, victim);
>        obj_to_char(obj2, victim);   !!
>        obj_to_char(obj2, victim);   !!
>        obj_to_char(obj2, victim);   !!

You can't give the same instance of an object to someone more than once!
That will completely screw up the pointers.  If you want the person to
have three 7090's (waybread?), you have to load three of them.

BTW, why have 5 obj pointers?  Why not just:

   obj = read_object(3104, VIRTUAL);
   obj_to_char(obj, victim);
   obj = read_object(....

(or, to be even fancier, write a function or macro which reads an object
and then performs obj_to_char; then just call that function or macro
however many times you want.)

-je



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