Re: [HELP]New Firewepon code

From: bruce (joshcrawford@YAHOO.COM)
Date: 12/07/97


---Demond LaZaro <demond@TOLKIEN.REALMS.ORG> wrote:
>
> Ok I've set up the basic code but need some help now,
> when I type 'clip ammo gun' (clip is the alias for do_loadweapon in
> interpreter.c it crashes ??
>
> Here the code and there are no compileing errors:
>
> 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);
>     extract_obj(ammo);
Move this line to below the act()s

>     act("You load $p into $P.", FALSE, ch, ammo, gun, TO_CHAR);
>     act("$n loads $p into $P.", TRUE, ch, ammo, gun, TO_ROOM);
Put it here;

You're trying to use an object that no longer exists.

==
<-- I apologize for any formatting problems as -->
<-- I am stuck using Yahoo! mail at the moment -->
<-- bruce - bruce@audiophile.com               -->
<-- http://www.AudioPhile.com/bruce            -->

_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com


     +------------------------------------------------------------+
     | 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