[SOLVED] Bug in cLuaWindow
#1
So I made a quick plugin to mess around with creating windows via cLuaWindow, yet I get an error (which actually seems to be a bug in the lua "glue" of MCServer, I've been reading documentation for a few hours trying to fix this)

Here is my code:
PLUGIN=nil
function Initialize(Plugin)
	Plugin:SetName("WndTest")
	Plugin:SetVersion(1)
	LOG("Initialised " .. Plugin:GetName() .. " v." .. Plugin:GetVersion())
    PLUGIN=Plugin
    return true
end
function OnDisable()
    LOG(PLUGIN:GetName().." v."..PLUGIN:GetVersion().." is shutting down...")
end
function CommandTest(split,Player)
    Wnd=cLuaWindow(0,9,3,"Test")
    Wnd:SetSlot(Player,1,cItem(E_ITEM_DIRT,64))
    Player:OpenWindow(Wnd)
end
cPluginManager.BindCommand("/wndtest","wndtest.use",CommandTest," - Test.")

When I run that, I get this error in the console:
Code:
[18:47:07] LUA: error in function 'new'.          
     argument #2 is 'nil'; '[no object]' expected.
Not sure if it's a bug, if it is then I'll submit it on Github later, but I just want to make sure this is not just me messing up.

edit: before one of my friends comes on here saying he wrote some of it too, he did, but it was mainly comments on the bottom left as a note for me that I omitted :p
Reply
Thanks given by:


Messages In This Thread
[SOLVED] Bug in cLuaWindow - by wolfmitchell - 01-04-2015, 09:57 AM
RE: Bug in cLuaWindow? - by xoft - 01-04-2015, 08:20 PM
RE: Bug in cLuaWindow? - by wolfmitchell - 01-05-2015, 05:29 AM



Users browsing this thread: 1 Guest(s)