Hey Folks,
I ran into a strange problem: When I try to calculate a chance, it returns zero even though none of the elements of the formula are zero. (I debugged all elements of the formula)
static public int numberOfOnesUsedOnDice = 1;
static public int usedDice = 1;
static public float chanceToRoleOne =0.0f;
static public void setChances()
{
chanceCoins = (numberOfOnesUsedOnDice / (6 * usedDice)) * 100.0f;
}
I call the function from a different script when I press a button. Given the debugs all values are properly set/ called during the whole process. But as already mentioned all variables used in the formula are != 0.
Any idea on why the formula would return 0?
Kind Regards
Dawnreaver