Bah, I just hadn't figured out the right search terms for the forum.
Defining the function as float from the beginning is the solution.
It's also in the manual, but I didn't quite grasp it until I tested it in action.
Code: ags
A very simple code example:
Code: ags
Produces error:
Type mismatch: cannot convert 'float' to 'int'
Is this a feature, or just a mistake on my part?
Is it not possible for a function to return a value in float?
Defining the function as float from the beginning is the solution.
It's also in the manual, but I didn't quite grasp it until I tested it in action.
float blop()
{
return 0.14;
}
function blop()
{
return 0.14;
}
Type mismatch: cannot convert 'float' to 'int'
Is this a feature, or just a mistake on my part?
Is it not possible for a function to return a value in float?