Re: Adding Levels with bpl17

From: Juliano Ravasi Ferraz (jferraz@linkway.com.br)
Date: 07/21/00


Hi.

Webremedies wrote:
>
> purgeplay.c: In function `purge':
> purgeplay.c:60: warning: comparison is always false due to limited range of
> data type
> i get that, i looked at purgeplay.c line 60 it's ->
>    if (player.level < 0 || player.level > LVL_IMPL) {
>       okay = 0;
>       strcpy(reason, "Invalid level");
> i changed all levels in structs.h to ubyte to get rid of all the other
> errors, but this one still applies?

For the same reason. The unsigned char range is 0 ~ 255, so,
player.level will never be lesser than 0. Change this conditional to:

    if (player.level > LVL_IMPL) {

This will check only if player level is greater than LVL_IMPL.

> any ideas? oh btw - thannks for the help 95% of all errors, are gone.

You are welcome. :-)

Hugs.

--
----=[ Juliano Ravasi Ferraz ]=----=[ jferraz@linkway.com.br ]=----
     Rayon Eletrônica e Informática Ltda. - Linkway Descalvado

Don't judge a book by its mini-series.


     +------------------------------------------------------------+
     | 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 : 04/10/01 PDT