what is assigned value for genderconstant
Try tracing each of the variables in that line to see which one(s) are not numerically defined. If any happen to come from textfields, then you need to be sure to convert the values from text to numbers before trying to process them.
Also, unless there are other circumstance around that code, that line of code you show in red will only execute once at the beginning of testing since it is not inside any function. So whatever value you trace for it will not change even if values that would define it change later on.
All of the variables are working, but now the answer is always -.06, no matter what the weight input is (num = weight).
The formula I have is BAC1 =((drinks * 0.06 * 100 * (1.055/num) * genderconstant) - (0.015 * hours));
It's different than the original, but there's still the same problem.
Gender constant depends on the person's gender. .66 for female and .73 for male.
What are the values of all the variables when the program starts? If you expect it to be anything else than whatever that value is (I'd guess it eautes to -.06), then you probably want to reread the second paragraph of my first response.
Maybe you need
total =(drinks * 0.06 * 100 * 1.055 / num * genderconstant) - (0.015 * hours)
As far as I can tell hours hasn't been assigned as a variable. Did you mean var hours:int = 4;?
Obviously this is not the full codgo, is not the definition of any variabla with the exception of BAC1.