Re: [code] [newbie] Race crash

From: Daniel Koepke (dkoepke@california.com)
Date: 12/19/96


On Thu, 19 Dec 1996, AxL wrote:

> pc_race_types[GET_RACE(ch)] 		(to get Halfing, Human, etc...)
> 
> 	Note:  when compiling with -Wall, i do get a
> warning  "array subscript has type `char'"  
> 
> message, but my C knowledge is not extensive enough to tell if this is
> a Bad Thing(tm) or no.

As an aside, I'd bet that your race variable is of type 'byte' or
'ubyte'.  You can kill those stupid warnings by prototyping the
call to the macro (eg., pc_race_types[(int)GET_RACE(ch)]).  But, to
my knowledge, there'd be no side-affects (other than the warnings)
if you just left it as is.


--
Daniel Koepke
dkoepke@california.com
Forgive me father, for I am sin.


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