是否有可能在 lua 函数中使用三个以上的参数?
这是我的一段代码:
LuaValue luaGlobals = JsePlatform.standardGlobals();
luaGlobals.get("dofile").call(LuaValue.valueOf("./data/Actions/" + a_itemScript));
LuaValue luaValLevel = CoerceJavaToLua.coerce(a_level);
LuaValue luaValPlayer = CoerceJavaToLua.coerce(a_player);
LuaValue luaValItem = CoerceJavaToLua.coerce(a_thing);
LuaValue luaValItemX = CoerceJavaToLua.coerce(a_fromX);
LuaValue luaValItemY = CoerceJavaToLua.coerce(a_fromY);
LuaValue luaOnUse = luaGlobals.get("onUse");
if(!luaOnUse.isnil())
{
luaOnUse.call(luaValLevel, luaValItemX, luaValItemY);
}
else
{
a_parent.WriteInConsole("\nx Cannot Run Script: " + a_itemScript);
}