[CODE] obj_index undefined?

From: dmodem (dmodem@CYBNETONLINE.COM)
Date: 11/24/97


I just made some major changes to the code and when I recompiled I got a
LOT of compiler errors.  That's ok.  I can understand most compiler errors.
 I went through them and got to one part where there were 3 errors on a
single line.

fight.c(545) : error C2065: 'obj_index' : undeclared identifier
fight.c(545) : error C2109: subscript requires array or pointer type
fight.c(545) : error C2224: left of '.virtual' must have struct/union type
.
.
.

and here is line 545 of fight.c
      if (GET_OBJ_VNUM(invobj) == GET_OBJ_VAL(weap_obj, 0)) {
as you can see obj_index (which I believe to be the root of all my
troubles) isn't on that line.  but it is in the define for GET_OBJ_VNUM().
#define GET_OBJ_VNUM(obj)       (GET_OBJ_RNUM(obj) >= 0 ? \

(obj_index[GET_OBJ_RNUM(obj)].virtual : -1))
which looks fine to me...but I
am a newbie.  there is one other mention of obj_index in utils.h but it is
in GET_OBJ_SPEC().  I didn't ever touch any code that did anything to
obj_index but I did use a few calls to GET_OBJ_VNUM().  I am wondering
where obj_index should be defined to get rid of my problem.
I have noticed that a lot of other files have a extern struct index_data
*obj_index; in them and db.c has a struct index_data *obj_index; in it so
it is defined somewhere yet it doesn't seem to stay defined over in fight.c...
Anyone have any idea what is going on?  If you need anymore info just ask.
BTW: 3.0bpl11, Win95
if you know what's going on I would sure like to know.  considering what
changes I made I don't see why obj_index would be undefined but who knows...


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