Hi there.
Then I try to get float value from config I getting this error:
InvalidCastException: Cannot cast from source type to destination type.
That happens only to float values.Code:CraftTimeDecreasePerLevel = (float) Config["CraftDecrease"];
Thanks in advance.
Solved Cannot cast from source type to destination type
Discussion in 'Rust Development' started by Shadow 7, Jul 1, 2015.
-
Config.Get<float>("CraftDecrease");
-
-
If you did: float floatN =(float) (int) ConfigVariable; it would of worked too. Atleast if it was represented internally as an int.
I don't have the time to explain how cast works from a mobile phone so that is my simple explanation. -
-