Moonsharp pairs(…) raises exception “bad argument #1 to 'next' (table expected, got string)”
- 阅读更多 关于 Moonsharp pairs(…) raises exception “bad argument #1 to 'next' (table expected, got string)”
问题 I don't get the point why this is happening. I am using Moonsharp to run LUA scripts in my application an I created a LUA function IN(v, ...) and I'd like to itterate over the ... parameter with pairs. IN('param1', 'param2', 'param1') -- expected it to return true function IN(v, ...) local args = ... local res = true for i, v in pairs(args) do if valueIn == v then res = true break end end return res end If it gets called I recieve the folowing exception: "MoonSharp.Interpreter