Anyway, the problem with Haramanai's code is that he's passing an object using the "Var" keyword. Which is nonsense since objects are always passed by reference.
Here is code to reproduce it:
This doesn't seem like it's your problem though (as far as I can tell from the source you just posted).
Here is code to reproduce it:
Type MyFloat Field value:Float EndType Local wrapFloat:MyFloat = New MyFloat DebugStop Test( WrapFLoat ) Function Test:Int( afloat:MyFloat Var) Return True EndFunctionRemove the 'Var' keyword from the function signiture and it works as expected.
This doesn't seem like it's your problem though (as far as I can tell from the source you just posted).