Re: code (fwd)

From: Brian Pape (bpape@ezl.com)
Date: 07/13/96


forwarding this to the list since the question wasn't mine.

Brian Pape
bpape@lc.cc.il.us
bpape@ezl.com
bpape@bill.gates.will.turn.the.internet.into.a.total.wasteland.org

---------- Forwarded message ----------
Date: Sat, 13 Jul 1996 14:53:54 -0700 (PDT)
From: Darrin Wilson <wilson@cc.cc.ca.us>
To: bpape@ezl.com
Subject: Re: code

>
> > sprintf(buf, "%sName: %s     Race: %s      Class: %s", buf, GET_NAME(ch),
> > GET_RACE(ch), GET_CLASS(ch));
> >
> > I kept getting a "Format argument is not a pointer(arg 5)" and arg 6, I
> > think it was.  What is wrong with it?  Do I have to define something?
>
> look at the definitions of those two macros you just used! (in utils.h).
> GET_RACE and GET_CLASS merely return a char variable that is part of the
> player struct.  You are trying to print that char as a string.
>
	I believe what you want is:

#define CLASS_ABBR(ch) (IS_NPC(ch) ? "--" : class_abbrevs[(int)GET_CLASS(ch)])
#define RACE_ABBR(ch) (IS_NPC(ch) ? "--" : race_abbrevs[(int)GET_RACE(ch)])

	Also defined in utils.h

---------------------------------====<>====---------------------------------
Darrin Wilson                                   Cerro Coso Community College
ITS Service Technician                       Kern Community College District
                      http://www.cc.cc.ca.us/~wilson/
---------------------------------====<>====---------------------------------



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