Re: Adding in firearms

From: Welcor (welcor@dune.net)
Date: 03/06/02


From: "Abraham Dizon" <soldier2003@HOTMAIL.COM>
> Heh I'm back again. Well the reload command compiled fine and seems to be
> okay. Here's the next part of the Firearms Code. Its the command shoot. I
> think there is a better way to do this command and even shorter but I
don't
> know how to do it so I made my own. But one problem with my shoot command
is
> that I got some errors heheh like always :P
>
> act.other.c:625: too few arguments to function `get_char_room_vis'
> act.other.c:636: too few arguments to function `get_char_room_vis'
                                                  ^^^^^^^^^^^^^^^^^
This function has changed - grep the code to find the new call method
(check out handler.c)

> act.other.c:658: `shot_types' undeclared (first use in this function)
> act.other.c:690: `shot_damage' undeclared (first use in this function)
                                 ^^^^^^^^^^

You need to _declare_ your variables - Especially when you're hiding them
in constants.c - add (to constants.h):

const int shot_damage[];
const char *shot_types[];

>
> -Constants.C-
> /* Part of Firearms Code by Abraham Dizon*/
> const char *shot_types[] = {
>   "a missile",
<snip>
> };
>
> /* Part of Firearms Code */
> const int shot_damage[] =   {
<snip>
 };
>
> As always, any help is greatly appreciated. Thanks. Also thanks to who
> helped me so far in doing this code. Hopefully I'll be able to finish this
> crap and move on to implementing it to my MUD heh. Also if you have
another
> way of implementing Firearms into the MUD, send me email on how to do it
> please! Thanks. Well I'm out.
>
> - Hero
>

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT