I've got the following scenario:
- I registered a c# function in nlua
- This function is called like this in the lua script:
SomeFunction({Amount = 1})
- The c# function gets called but now the Amount is some arbitrary huge double
The code in which I register the function:
Lua LuaInterface = new Lua();
someFunction = (LuaTable t) => DoSomething(t);
LuaInterface.RegisterFunction("SomeFunction", someFunction.Target, someFunction.Method);
If I use the debugger, t is for example {{ Amount = -2,05689484611373E-178 }}
I've spent about two hours finding a bug in my code (the real one is far more complex) and this is just what I reduced the problem to.