String should be Float with loaderInfo


I have this error

trace( Lib.current.loaderInfo.parameters.size ));
src/Main.hx:167: characters 18-61 : String should be Float
src/Main.hx:167: characters 18-61 : For function argument 'x'

size = “3456”


Use Std.parseInt() rather than

return ‘undefined’ and null

this code work Reflect.field( Lib.current.loaderInfo.parameters, "size" ) )

Could you run the following, and see what it traces?

var size = Lib.current.loaderInfo.parameters.size;
trace ("'" + size + "'");
trace (Std.parseInt (size));

Thanks, it work now.