void floatfunc(float); int l = 1; floatfunc(l * 0.2);The parameter in the function call is evaluated as an integer, not a float. Shouldn''t it be the other way around? On that note, is there anyway to typecast in angelscript? As a workaround I''m using my own toInt and toFloat functions that I expose to AS. - Xavier
Members - Reputation: 133
Posted 25 May 2004 - 04:52 PM
Moderators - Reputation: 4408
Posted 26 May 2004 - 01:05 PM
That said, I think the correct way would be to have the compiler give a warning that the float is implicitly cast to integer. Or perhaps even an error. I might change this for future versions of AngelScript.
www.AngelCode.com - game development and more...
AngelScript - free scripting library - Tower - free puzzle game
[edited by - WitchLord on May 27, 2004 6:54:25 AM]