do_who problem/legend system/GET_LEVEL(tch)

From: Josh Harris (jharris2@ACSU.BUFFALO.EDU)
Date: 01/19/02


Ok, let me start out with the basics.

Version:  Circlemud bpl17 w/ Oasis Olc
OS:       Windows 2K
Compiler: Cygwin

I am working on adding a newbie and legend system.  Well more or less a
legend (Players Lvl 81-89).  I have been able to incorporate part of the
code by giving them a legend flag and showing it on the who list.  I've
also been able to change the color they appear on the who list to white.

This is the source code (act.informative.c) of the color part and where I'm
having the problems at:

sprintf(buf, "%s%s%s[%2s %-50s] %s %s ",
(GET_LEVEL(tch) >= LVL_IMMORT ? CCYEL(ch, C_SPR) : ""),
(GET_LEVEL(tch) <=LVL_NEWBIE ? CCRED(ch, C_SPR) : ""),
((GET_LEVEL(tch)<LVL_IMMORT && GET_LEVEL(tch)>=LVL_LEGEND) ?
       CCWHT(ch,C_SPR) : ""),
((GET_LEVEL(tch)<LVL_IMMORT && GET_LEVEL(tch)>=LVL_LEGEND) ?
       "LEG" : GET_LEVEL(tch)),                  //Problem is here
CLASS_ABBR(tch), GET_NAME(tch), GET_TITLE(tch));

Ok the problem is the %2s and
((GET_LEVEL(tch)<LVL_IMMORT && GET_LEVEL(tch)>=LVL_LEGEND) ?
       "LEG" : GET_LEVEL(tch)),

When I compile it the error I get is:
act.informative.c:1278: warning: pointer/integer type mismatch in
conditional expression

It will run fine if I eliminate the GET_LEVEL(tch) and will put up "LEG" in
the mud when that is eliminated.

I have tried to separate the two into two different conditional statements
and tried altering the %2* tag to c, d, and s.

Any suggestions?

Oh yeah, the other thing I wanted to ask is:
I'm using the Easy Color patch again, and I was wondering how I could use
the bold colors (BRED) in the above part instead of the regular ones
(CCRED).

I tried adding the BRED part from color.c to screen.h and some of those,
but that didn't seem to work.

Again, any help would be appreciated.

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