Re: [CODE]Freweapon Help

From: StormeRider (silk@ICI.NET)
Date: 12/08/97


At 10:59 AM 12/8/97 +0000, you wrote:
>Heres the code:
>void perform_load(struct char_data * ch, struct obj_data * ammo,
>                      struct obj_data * gun)
>{
>    GET_OBJ_VAL(ammo, 0) += GET_OBJ_VAL(gun, 0);
>    act("You load $p into $P.", FALSE, ch, ammo, gun, TO_CHAR);
>    act("$n loads $p into $P.", TRUE, ch, ammo, gun, TO_ROOM);
>    extract_obj(ammo);
>}
>
Um, is it just me or is act expecting what you have for the second object
to be a character? Try rewriting it without using act() (via send_to_char
or better yet send_to_room mixed with sprintf() and see what happens.
Mailer code:

sprintf(buf, "%s puts %s into %s.\r\n", GET_NAME(ch), ammo->short_description,
  gun->short_description);
send_to_room(buf, ch->in_room);

Again this is mailer code may have mixed some things up.)


StormeRider                  --- http://www.windsofstorm.net/wos/
silk@ici.net                 --- telnet://cmoo.com:4004


     +------------------------------------------------------------+
     | 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/08/00 PST