So I am looking to get the SquareRoot of 5.9 and I am using fRoot = SquareRoot(5.9);
The issue I am seeing is that it returns a value of 2 and not 2.4. In the HelpCommands it specifies you can pass in float and have a float returned. This does not appear to be working as documented?
Yup, looks like it is an Int32. It clearly says ‘I32’ in the strategy tree.
Once created and in use, you can not change the type, only the name… so…
You will need to slightly rename Int32 in the strategy tree.
Then create a new one, being sure to select float from the drop down type list.
Then rename your Optoscript from the slightly different name to the new name and thus move it from the Int32 over to the new float.
Or you can got To Configure | Options and check this option and not have to do the whole renaming thing which is useful when your variable is in a lot of places in Optoscript blocks: