Hi everyone,
Is it possible to convert from int to float in OB2?
i think you can output the integer to a constant string block and from there you can use that constant string block as a float variable on keycheck if thats what you mean?
No, that is not what I want. In a config I have a Count Occurrences block that shows me how many times a word is repeated, which can be at least 1 or 2, the variable is saved in COUNT (Int variable) and later I want to use the Compute block to subtract 1 from the COUNT variable. This Compute block saves the output variable in a Float format and for this reason an error is produced stating that Int cannot be converted to Float.
If you open up the config and go to the lolicode you can cast the value with C#.
float ConvertedToFloat = (float)OutputVariableFromCountOccurences;
Thanks for the advice but I’ve already solved it another way