Monodevelop c # script runtime error
I have a very simple if statement that doesn't work as expected.
My main problem is that the immediate window evaluates the if statement differently than executing the code:
if( FreeProductStorageVolume < product.Volume * quantity )
{
Debug.Log( FreeProductStorageVolume );
Debug.Log( product.Volume );
Debug.Log( quantity );
Debug.Log( product.Volume * quantity );
canProduce = false;
}
all variables are floats
everything assumes that the breakpoint at line 824 should not be removed.
even the Immediate window evaluates the if () statement as false.
did something similar happen to someone else?
+3
source to share