Re: [newbie] weapon spells with bpl21

From: Mike Stilson (
Date: 06/29/02

On Sat, Jun 29, 2002 at 03:21:43PM +0200, Peter d wrote:
>I got the add_wpn_spells.txt from the ftp..

Seems people like this again.  Maybe I should update it.

>I made some smaller changes to make it fit in the code..

Hmm.  Did I use send_to_char()'s?

>but i get some errors i have no idea on how to fix without making the mud
>void weapon_spells(struct char_data *ch, struct char_data *vict, struct
>obj_data *wpn) {
>i get type mismatch on that line in fight.c .. check the txt file for
>definitions and etc..

The only way I can see a type mismatch happening there is if you don't
have the function prototyped and it says something about "no prototype"
or "already returns int" or whatever that warning is, something about a
previous definition.

I didn't bother mentioning to add prototypes to the top of the file.
just add:

void weapon_spells(struct char_data *,struct char_data *, struct obj_data *);

at the top of fight.c where the other functions are prototyped.

>then i get undefined symbol on these three lines in db.c ..
>     obj_proto[i].wpn_spells[wsplnum].level=t[1];
>     obj_proto[i].wpn_spells[wsplnum].percent=t[2];
>the undefined symbol is wsplnum..

It's just an int counter.  At the top of parse_object just add:

int wsplnum = 0;



PS: Off topic, is there some reason (char|obj|room)_data aren't just
typedef'ed in stock?

   | FAQ: |
   | Archives: |
   | Newbie List:   |

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