Re: [CODE][??newbie??] adding levels

From: Admin of The Keep (dkoepke@california.com)
Date: 10/22/96


On Tue, 22 Oct 1996, Mud Administrator wrote:

> warning: comparison is always 1 due to limited range of data type
> (or always 0 depending on the comparison)
> 
> GET_LEVEL(ch) gets the value from one of the player structs if I am 
> correct, player.level    where in the player struct level is  assigned as:
> 
> byte level;
> 
>  (ok, sorry if you don't need all of this info, I'm just used 
> to having to explain rather large chunks of information bout code when 
> asking for assistance)
> 
> my question: what should I do about this warning? from what some of the 
> comaprisons were in (do_save, do_kill, do_steal, etc..) it doesn't look 
> like I can just iognore this, so what should I do about this? am I 
> missing something?

  A byte is a holding place for a character; since a byte is signed it
  has a range of -128-127.  200 is out of that range.  Changing level
  to ubyte should give you 0-255.


  <*=-+Daniel+-=*>
  "Forgive me father, for I am sin."


+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



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