Re: [Newbie] [DG Scripts] Few questions for anyone.

From: Mythran (kip_potter@hotmail.com)
Date: 06/27/02


> medit.c: In function `medit_disp_menu':
> medit.c:468: warning: array subscript has type `char'
>
> Relevant code:
>
>           "%sQ%s) Quit\r\n"
>           "Enter choice : ",
>
>           grn, nrm, yel, position_types[(int)GET_POS(mob)],
>           grn, nrm, yel, position_types[(int)GET_DEFAULT_POS(mob)],
> here->    grn, nrm, yel, attack_hit_text[GET_ATTACK(mob)].singular,
>           grn, nrm, cyn, buf1,
>           grn, nrm, cyn, buf2,
> #if CONFIG_OASIS_MPROG
>           grn, nrm, cyn, (OLC_MPROGL(d) ? "Set." : "Not Set."),
> #endif

The error states that the array subscript (which the only array subscript
where YOU point out is GET_ATTACK) has type 'char' (array subscripts need
int, long, or some other numeric expression.  Therefore, check to see if
GET_ATTACK is indeed a char, and if applicable, type cast it.

Mythran

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