On Fri, Dec 07, 2001 at 02:04:18PM -0200, Eduardo Bertin wrote:
>Please, it would like to know if this code that I made possesss some error, helps me?
>
>void hit2_bar(struct char_data * ch, struct char_data *k)
>
>{
>
>*buf1 = (GET_HIT(k) * 100) / GET_MAX_HIT(k);
>if (*buf1 >= 80)
>sprintf(buf, "&cW%s : &cB%d ", GET_NAME(k), *buf1);
>else if (*buf1 >= 60)
[ snip ]
>else if (*buf1 >= 0 )
>sprintf(buf, "&cW%s : &cR-- &cL ", GET_NAME(k));
>
>send_to_char(buf, ch);
>send_to_char("%&c0 \r\n", ch);
>}
More of a c question, but...
add "int percent;" at the beginning of the function, and change ALL of
the *buf1's to "percent".
-me
--
+---------------------------------------------------------------+
| FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
| Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
+---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 06/24/03 PDT