--- Shaun Bourque <GraspCHAOS@aol.com> wrote:
> just wanted to add a line to my score sheet, didnt think i'd hafta
> call
> congress for a vote.
> when compiling gives me these errors
> warning: format argument is not a pointer (arg 5)
> warning: format argument is not a pointer (arg 6)
> warning: format argument is not a pointer (arg 7)
>
> and refers to this line of code
>
> sprintf(buf, "%s: You are a %d year old %s %s %s. Your level is %d.",
> GET_NAME(ch), GET_AGE(ch), GET_SEX(ch), GET_RACE(ch), GET_CLASS(ch),
> GET_LEVEL(ch));
> send_to_char(buf, ch);
>
As everyone has been saying, your GET_SEX(ch) actually returns a
number. The same goes for GET_CLASS(ch) as well, and should also be the
same for your GET_RACE(ch). They also mentioned a way to do this, but I
think there's a shorter way:
You can actually make use of the list of genders[] in constants.c and
pc_class_types[] in class.c. For the list of race, you can make one as
well so that you can use it next time around:
sprintf(buf, "%s: You are a %d year old %s %s %s. Your level is %d.",
GET_NAME(ch), GET_AGE(ch), genders[GET_SEX(ch)],
pc_race[GET_RACE(ch)], pc_class_types[GET_CLASS(ch)], GET_LEVEL(ch));
Uhmm... you might need to declare the pc_class_types[] first tho since
it's in class.c, unlike genders[].
G'luck!
===
Afizal Mustapa
Petaling Jaya, Malaysia
(amustapa@hotmail.com)
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST