I'm using the latest lua interface and trying to run this code
luanet.load_assembly("Phoenix")
luanet.load_assembly("Phoenix.Structures")
NpcDialog = luanet.import_type("Phoenix.Structures.NpcDialog")
function npc(request, client)
local dialog = new NpcDialog(client)
dialog.Text("hi this is a test")
dialog.Send()
end
but getting this error LuaInterface.LuaException: [string "chunk"]:6: attempt to call global 'NpcDialog ' (a nil value)
the exe name is Map Server.exe
Assembly name Map Server
Default namespace Phoenix
it happens because the the assembly of the file different than the Assembly name and i don't know why!!
is there a way to make it work without changing the Assembly name
Line 6 is valid Lua code but it does not do what you think. Lua parses it as if there was a ; after
new, and so tries to callNpcDialog.