Re: [newbie]

From: berzerk (mud@mamma-mu.campus.luth.se)
Date: 10/09/96


On Wed, 9 Oct 1996, Isak Styf wrote:

> mud@mamma-mu.campus.luth.se wrote:
> > 
> >     22    for (i = 0; i <= top_of_zone_table; i++)
> >     23      if (zone_table[i].number == vnum)
>                               ^^^
> > utils.c: In function `get_zone_rnum':
> > utils.c:23: arithmetic on pointer to an incomplete type
> > utils.c:23: dereferencing pointer to incomplete type
> 
> Jupp, it is very basic. In fact so basic that i failed to find the
> problem the first time i looked over the code.
> 
> The problem is this. On line 17 you declare zone_table as being a
> pointer to an extern struct. However, you arent using the correct
> operand ( -> ) to extract data from that pointer on line 23. Instead you
> use the operand . which is used when you want to extract data from
> objects of structs.
> The correct code would be :
> 	23	if (zone_table[i]->number == vnum)
> 

Ok, I solved the problem. Thanks for all corrections I got though they
were all wrong :) The problem was that I needed to include db.h (where
zone_data is defined)

+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/18/00 PST