#CLASS {BMI}
#VAR feet {0}
#VAR inches {0}
#VAR newfeet {0}
#VAR weight {0}
#VAR totalinches {0}
#VAR bmi {0}
#TRIGGER {height is %1 feet, %2 inches} {
#MATH feet @feet+%1
#math inches @inches+%2
#math newfeet (12*@feet)
#math totalinches @newfeet+@inches
}
#TRIGGER {weight %3 pounds} {
#MATH weight @weight+%3
#math bmi (@totalinches*@totalinches / @weight)<<<---I Think this is were im going wrong
}
#TRIGGER {Your height is (%d) feet, (%d) inches, weight (%d) pounds} {#SUB {Your height is %1 feet, %2 inches, weight %3 pounds, BMI @bmi}
}
#CLASS 0
when i put this in to my command bar its subbing the line but the math is all wrong and ever time i press stat is add more to the bmi...
this is what it looks like:
stat
Your height is 6 feet, 1 inches, weight 183 pounds, BMI 29, weight carried 6.1 lbs, worn: 41.7 lbs.
stat
Your height is 6 feet, 1 inches, weight 183 pounds, BMI 58, weight carried 6.1 lbs, worn: 41.7 lbs.
stat
Your height is 6 feet, 1 inches, weight 183 pounds, BMI 87, weight carried 6.1 lbs, worn: 41.7 lbs.
my bmi is actually 24.1 but as you can see its not showing that
this is the bmi formula
Imperial BMI Formula
1 foot = 12 inches
inches┬▓ = inches * inches
( lbs/inches┬▓ )
Table: Imperial BMI Formula BMI =
(weight in pounds * 703 ) / height in inches┬▓
If someone could please help me with this i would be extremely grateful