Re: [CODE] I hope and pray I'm not asking FAQs :(

From: Russ Brown (
Date: 07/01/00


>const char *pc_class_types[] = {
>  "Magic User",
>  "Cleric",
>  "Thief",
>  "Warrior",
>  "\n"
>I am sure there is some code in there somewhere to use that
>just search the code for pc_class_types and see what they
>do to call it. (to get the proper class)

if you want to print out the class name contained in pc_class_types,
use the following expression.

pc_class_types[(int) GET_CLASS(ch)]

The int cast may or may not be required, I think that I got a compiler
warning (but not an error) without it. You may also have to declare
pc_class_types as an extern variable depending on what file you
are working in.  heres how

extern const char *pc_class_types[];

Russ Brown

Why pay for something you could get for free?
NetZero provides FREE Internet Access and Email

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

This archive was generated by hypermail 2b30 : 04/10/01 PDT