can someone help out and tell me why this code doesn't display right?
it is supposed to be a healthbar based on health percentage
it seems to only display blank unless I am at 100% health.
it is supposed to be a healthbar based on health percentage
send_to_char("[",ch);
int value;
value = ch->hit/ch->max_hit ;
for (start = 1; start <= 100; start++ )
{
if (start <= value * 100)
send_to_char("|",ch);
else
send_to_char(" ",ch);
}
send_to_char("] \r",ch);
it seems to only display blank unless I am at 100% health.