Doh! This was backwards: > /* find the ratio of max_hit / 50 */ > val = GET_MAX_HIT(ch) / 50; You should divide 50 by max_hit here. So, try this, heehee: int i; float val; val = GET_HIT(ch) * 50 / GET_MAX_HIT(ch); for (i = 0; i <= val; ++i) *(buf2 + i) = '*'; *(buf2 + i) = '\0'; sprintf(buf, "[ %-50s ] LIFE METER\r\n", buf2); send_to_char(buf, ch); Christopher (awake@dcci.com)
This archive was generated by hypermail 2b30 : 12/07/00 PST