Integrated Dynamics

Integrated Dynamics

63M Downloads

Fluid ratio < 95% = false

demethan opened this issue ยท 5 comments

commented

How would I go about doing that.

I got a Double variable with A(Tank Fluid ratio) and B(Double with 0.95)

I try to A <= B and I get and error

"the operator has receive an input type Double at position 1 while the type interger is accepted"

so I tried to conver the TankFluid ratio to an interger but it won't multiply by 100

"The current variable cannot be use in this aspect" Although, for a secon I do see the correct result in the panel.

thanks.

p.s. Love the mod.. I love to code but this is fun to work with.

commented

This seems to be a bug, I just checked, and apparently comparator operators only support integers. I'll look into supporting any number type.

For now, multiplying by 100 and casting to int should work.

commented

I tried that.. multiplying by 100 gives an error. "The current variable cannot be use in this aspect"

I don't think I can cast the ratio to int. That would void the data as I need the decimal information. right?

commented

You still have to cast to an int, since it will be a double in your case.

commented

I am confused by your statement. Casting the fuel ratio to int would loose the decimals, right?

What is the point of casting the Double to Int. Is there something I don't get?

commented

My friend figured it out for me.. I was multiplying by 100 INT, where I should have multiplied by 100 DOUBLE.