Re: [newbie]

From: Desmond Daignault, Text DBA Contractor (tekdd@dtol.datatimes.com)
Date: 10/08/96


On Tue, 8 Oct 1996 mud@mamma-mu.campus.luth.se wrote:

:Sorry to have to post this message but this function is driving me nuts..
:
:--
:    14  int get_zone_rnum(int vnum)
:    15  {
:    16    extern int top_of_zone_table;
:    17    extern struct zone_data *zone_table;
:    18
:    19    char buf[150];
:    20    int i;
:    21
:    22    for (i = 0; i <= top_of_zone_table; i++)
:    23      if (zone_table[i].number == vnum)

Try replacing line 23 with if ((zone_table + i)->number == vnum)

:    24        return i;
:    25
:    26    sprintf(buf, "get_zone_rnum called w/ invalid vnum (%d)", vnum);
:    27    log(buf);
:    28    return 0;
:    29  }
:--
:and these are the errors I get...
:
: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
:
:If someone could point out the error to me it would be very appreciated..
:
:/Berzerk the brain-dead..
:
--

Dez.

-+= Nudd the Usurper =+-

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